Python 升级到 pip 版本 9.0.1
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/43226831/
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
Upgrading to pip version 9.0.1
提问by Maverick
I am getting the following error message when installing some libraries on PyCharm:
在 PyCharm 上安装某些库时,我收到以下错误消息:
Command "python setup.py egg_info" failed with error code 1 in C:\Users\user.name\AppData\Local\Temp\pycharm-packaging\hachtheitroad-metadata\ You are using pip version 8.1.1, however version 9.0.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.
命令“python setup.py egg_info”在 C:\Users\user.name\AppData\Local\Temp\pycharm-packaging\hachtheitroad-metadata\ 中失败,错误代码为 1 您正在使用 pip 版本 8.1.1,但是版本 9.0。 1 可用。您应该考虑通过“python -m pip install --upgrade pip”命令进行升级。
Path to pip3.5.exe:
pip3.5.exe 的路径:
C:\Users\user.name>AppData\Local\Programs\Python\Python35-32\Scripts\pip3.5.exe
I have run the following from cmd:
我已经从 cmd 运行了以下命令:
C:\Users\user.name>AppData\Local\Programs\Python\Python35-32\Scripts\pip3.5.exe install upgrade pip
Which gives me the following:
这给了我以下内容:
Could not find a version that satisfies the requirement upgrade (from versions: ) No matching distribution found for upgrade You are using pip version 8.1.1, however version 9.0.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.
找不到满足升级要求的版本(来自版本:) 找不到升级的匹配发行版 您正在使用 pip 版本 8.1.1,但是版本 9.0.1 可用。您应该考虑通过“python -m pip install --upgrade pip”命令进行升级。
I then tried both:
然后我尝试了两者:
C:\Users\user.name>AppData\Local\Programs\Python\Python35-32\Scripts\pip.exe pip install upgrade pip
and:
和:
C:\Users\user.name>AppData\Local\Programs\Python\Python35-32\Scripts\pip.exe python -m pip install --upgrade pip
From pip.exe (rather than pip3.5exe as they didn't work on that) which resulted in:
从 pip.exe (而不是 pip3.5exe,因为他们没有在那个上工作)导致:
ERROR: unknown command
错误:未知命令
I am pretty sure that I am doing something wrong here, but not quite sure what?
我很确定我在这里做错了什么,但不太确定是什么?
Tried the following:
C:\Users\user.name>\AppData\Local\Programs-m pip install --upgrade pip
尝试了以下操作:
C:\Users\user.name>\AppData\Local\Programs-m pip install --upgrade pip
C:\Users\user.name>\AppData\Local\Programs\Python\Python35-32\Scripts\pip.exe -m pip install --upgrade pip
C:\Users\user.name>\AppData\Local\Programs\Python -m pip install --upgrade pip
回答by Christian K?nig
Use python -m pip install --upgrade pip
as the command, not as an argument to pip.exe
. This will call python.exe
with -m pip install --upgrade pip
as arguments.
使用python -m pip install --upgrade pip
的命令,而不是作为一个参数pip.exe
。这将调用python.exe
with-m pip install --upgrade pip
作为参数。
Also make sure you are running this from a command prompt with admin rights.
还要确保您从具有管理员权限的命令提示符下运行它。