• Sublime Text Python Anaconda自动提示

    Preferences》Package Control Install Package Anaconda 点击第一个,安装 稍等几秒钟,取决于网络,安装完成之后,会出来这个, 后续配置,这边,我没有配置,不影响使用 如果需要配置一些特别功能,可以参考下面链接 参考: https://blog.51cto.com/u_15116285/5964479 https://blog.51cto.com/u…

    学习 2023-01-26 235

  • Windows Python更新

    首先去python官网下载最新安装包:https://www.python.org/ 首先看一下当前版本,cmd输入python 下载python安装包,直接安装就可以,路径根据自己, 然后安装好之后,重新设置一下python的环境变量,因为电脑上已经有python的话,环境变量还是之前的,他不会自动重新设置, 下一步 参考: https://blog.csdn.net/hj960511/arti…

    文章 2023-01-18 194

  • python print打印输出中文显示乱码

    在开头加上以下代码 网上很多说的这个,我这边使用都是没有效果的 # -*- coding: utf-8 -*- 或者 # encoding: utf-8 这个有效果 #设置 import io import sys sys.stdout=io.TextIOWrapper(sys.stdout.buffer,encoding='utf-8')

    学习 2021-05-28 1686

  • Linux pip: command not found

    一般linux上都自带python python查看版本 python -V 第一步 如果pip版本和python版本不符,会提示错误, python版本>=36 curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python版本==27 curl https://bootstrap.pypa.io/pip/2.7/get-pip.py…

    学习 2021-05-01 1682

  • Python excel xlwt Exception: Attempt to overwrite cell

    添加cell_overwrite_ok=True 例如 worksheet = workbook.add_sheet("Sheet 1", cell_overwrite_ok=True) 参考: https://stackoverflow.com/questions/2679502/python-xlwt-attempt-to-overwrite-cell-workaround

    学习 2021-04-28 2756

  • Python xlrd.biffh.XLRDError: Excel xlsx file; not supported

    因为高版本xlrd只支持xls文件 卸载掉高版本的 安装低版本即可 pip uninstall xlrd pip install xlrd==1.2.0 参考: https://blog.csdn.net/weixin_44073728/article/details/111054157

    学习 2021-04-28 2267

  • Python UnboundLocalError: local variable ‘xxxx’ referenced before assignment

    理想 a = 0 def hello(): a += 1 print(a) hello() 现实 UnboundLocalError: local variable 'a' referenced before assignment 解决 声明全局变量global global a a = 0 def hello(): global a a += 1 print(a) hello() 不出意外的话不…

    学习 2020-12-10 2603