Python升级pip

终端中升级

Python3升级

C:\Windows\system32>pip3 --version
pip 10.0.0b2 from C:\Program Files\Python36\lib\site-packages\pip-10.0.0b2-py3.6.egg\pip (python 3.6)

C:\Windows\system32>python3 -m pip install --upgrade pip
Collecting pip
  Using cached https://files.pythonhosted.org/packages/46/dc/7fd5df840efb3e56c8b4f768793a237ec4ee59891959d6a215d63f727023/pip-19.0.1-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 10.0.0b2
    Uninstalling pip-10.0.0b2:
      Successfully uninstalled pip-10.0.0b2
Successfully installed pip-19.0.1

//如发生错误,删除文件夹:C:\Program Files\Python36\lib\site-packages\pip-19.0.1.dist-info 后重新安装

C:\Windows\system32>pip3 --version
pip 19.0.1 from c:\program files\python36\lib\site-packages\pip (python 3.6)

Python2升级

C:\Windows\system32>pip --version
pip 10.0.0b2 from C:\Program Files\Python27\lib\site-packages\pip-10.0.0b2-py2.7.egg\pip (python 2.7)

C:\Windows\system32>python -m pip install --upgrade pip
Collecting pip
  Using cached https://files.pythonhosted.org/packages/46/dc/7fd5df840efb3e56c8b4f768793a237ec4ee59891959d6a215d63f727023/pip-19.0.1-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 10.0.0b2
    Uninstalling pip-10.0.0b2:
      Successfully uninstalled pip-10.0.0b2
Successfully installed pip-19.0.1

//如发生错误,删除文件夹:C:\Program Files\Python27\lib\site-packages\pip-19.0.1.dist-info 后重新安装

C:\Windows\system32>pip --version
pip 19.0.1 from c:\program files\python27\lib\site-packages\pip (python 2.7)

注:需使用管理员身份运行CMD

PyCharm中升级

PyCharm中的pip如何升级?总是升级不上?

pip库一直无法升级到10.0版本,每次升级都显示成功,但版本还是之前的,如何解决?

双击pip后面的蓝色升级箭头按钮。弹出更新包对话框,Specify version要打对勾。然后install package即可。

版权声明:
作者:Joe.Ye
链接:https://www.appblog.cn/index.php/2023/04/01/python-upgrade-pip/
来源:APP全栈技术分享
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
打赏
海报
Python升级pip
终端中升级 Python3升级 C:\Windows\system32>pip3 --version pip 10.0.0b2 from C:\Program Files\Python36\lib\site-packages\pip-10.0.0b2-py3.6.egg\p……
<<上一篇
下一篇>>
文章目录
关闭
目 录