本教程用于Python pip升级及失败解决方案 首先查看脚本 pip show pip 我已经升级到了最新的版本 安装其他模块过程中出现下面提示,便说明你需要升级pip You are using pip version 18.1.1, however version 19.0.1 is available. 你的版本为18.1.1需要升级到19.0.1 You should consider upgrading via the 'python -m pip install --upgrad
import os,time allPackage=os.popen('pip list') allPackage=allPackage.read() allPackage=allPackage.split('\n') allPackage=[pkg.split(' ')[0] for pkg in allPackage] for pkg in allPackage: if pkg!='': print(os.popen('pip install -U {}'.format(pkg)).read
我已经升级到了最新的版本 安装其他模块过程中出现下面提示,便说明你需要升级pip You are using pip version 10.0.1, however version 21.3.1 is available.You should consider upgrading via the 'python -m pip install --upgrade pip' command 当在下面出现Success,那么恭喜你安装成功. 失败的看这里: 失败的首先可以尝试更换升级指令,例如: py
原本使用pip版本为7.1.0,后升级至9.0.1 之后使用pip list提示pkg_resources.DistributionNotFound: The 'pip==7.1.0' distribution was not found and is required by the application 解决方法: vim /usr/bin/pip ------------------- #!/usr/bin/python # EASY-INSTALL-ENTRY-SCRIPT: 'pip=