Python升级pip

终端中升级

Python3升级

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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升级

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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即可。

Powered by AppBlog.CN     浙ICP备14037229号

Copyright © 2012 - 2020 APP开发技术博客 All Rights Reserved.

访客数 : | 访问量 :