Python 如何在 Windows 上降级已安装的“pip”版本?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24773109/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to downgrade the installed version of 'pip' on windows?
提问by Alex
On a windows 7 machine I have pip
version 1.5.6 installed:
在 Windows 7 机器上,我pip
安装了 1.5.6 版:
pip 1.5.6 from C:\Users\dietz\PNC\tas\ENV\lib\site-packages (python 2.7)
In order to find the reason for an error I want to install a different version of pip, which worked fine for me. So how can I uninstall pip
and install version 1.2.1 instead?
为了找到错误的原因,我想安装不同版本的 pip,这对我来说很好用。那么我该如何卸载pip
和安装 1.2.1 版呢?
采纳答案by Leonardo.Z
pip
itself is just a normal python package. Thus you can install pip with pip.
pip
本身只是一个普通的python包。因此,您可以使用 pip 安装 pip。
Of cource, you don't want to affect the system's pip, install it inside a virtualenv.
当然,您不想影响系统的 pip,请将其安装在 virtualenv 中。
pip install pip==1.2.1
回答by Maziyar Mk
If downgrading from pip version 10 because of PyCharm manage.py or other python errors:
如果由于 PyCharm manage.py 或其他 python 错误而从 pip 版本 10 降级:
python -m pip install pip==9.0.1