• python改国内源

    cmd执行 例如 改成阿里云源 单独某个 pip install 安装包名称 -i https://mirrors.aliyun.com/pypi/simple/ 一劳永逸所有的 pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ 以下不同的源地址 1 清华大学(完全度和速度都很好,是一个优秀的pip镜像源…

    学习 2023-12-04 109

  • ERROR: No matching distribution found for win32print

    执行pip install win32print的时候, 却提示这个, ERROR: Could not find a version that satisfies the requirement win32print (from versions: none) ERROR: No matching distribution found for win32print 所以需要这样安装 pip in…

    学习 2023-07-18 551

  • python pyqt

    这里只简单记录一下 安装 pip install PyQt6 pip install pyqt6-tools 第一个Qt程序 #!/usr/bin/python import sys from PyQt6.QtWidgets import QApplication, QWidget, QPushButton def main(): app = QApplication(sys.argv) w = …

    学习 2023-07-17 424

  • 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 510

  • Windows Python更新

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

    文章 2023-01-18 453

  • 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 1886

  • 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 1934

  • 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 3121

  • 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 2474

  • 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 2800