Python 如何升级到 Pip 10?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/48952993/
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 upgrade to Pip 10?
提问by Daniel Sl?tt
My Python has Pip 9.1 installed. Unfortunately, a package called Scapely has a bug and won't install. There's supposed to be a fix for Pip 10.0, but when I try to upgrade pip using "python -m pip install -U pip", but Python says "requirement already up-to-date" following this command.
我的 Python 安装了 Pip 9.1。不幸的是,一个名为 Scapely 的包有一个错误,无法安装。Pip 10.0 应该有一个修复程序,但是当我尝试使用“python -m pip install -U pip”升级 pip 时,但是 Python 在此命令之后说“要求已经是最新的”。
Any way to install Pip 10.0 manually? Thanks!
有什么方法可以手动安装 Pip 10.0?谢谢!
回答by harshil9968
Update :
更新 :
Since the new version is available you can just do
由于新版本可用,您可以这样做
pip install --upgrade pip
For a fresh install of pip 10:
对于全新安装的pip 10:
MAC OS and LINUX
MAC 操作系统和 LINUX
curl https://bootstrap.pypa.io/get-pip.py | sh
WINDOWS
视窗
Open thisin browser and download using Ctrl+S
.
在浏览器中打开它并使用Ctrl+S
.
Open this file using file manager.
使用文件管理器打开此文件。
Orin windows power shell or command line:
或者在 windows power shell 或命令行中:
python get-pip.py
Previous Answer:
上一个答案:
Download thismaster branch from github, or you can also clone the repository.
从 github下载这个master 分支,或者你也可以克隆存储库。
Once inside the folder, either cloned or unziped the downloaded file:
进入文件夹后,克隆或解压缩下载的文件:
python setup.py install
Then to verify: pip -V or
然后验证: pip -V 或
pip --version
回答by Stefano M
A Beta release of pip version 10is on PyPI: you can just
pip install --upgrade --pre pip
PyPI 上有一个pip 版本 10 的 Beta 版本:你可以
pip install --upgrade --pre pip
回答by dinesh rajput
upgrade
option is like below command.
upgrade
选项就像下面的命令。
pip install --upgrade 'pip==10'
回答by hoefling
Until pip==10.0.0
is released, you can let pip
upgrade itself to the latest development version from its git repository:
在pip==10.0.0
发布之前,您可以让pip
自己从其 git 存储库升级到最新的开发版本:
$ pip install --upgrade git+https://github.com/pypa/pip
This way you don't have to download pip
s sources yourself, although harshil9968's answeris also correct.
这样你就不用pip
自己下载s源了,虽然harshil9968的回答也是正确的。
Once the new version is released, just do the usual
新版本发布后,只需执行常规操作
$ pip install --upgrade pip
回答by PapeK24
try one of theese (or both) depending on which version of python / pip you use
根据您使用的 python / pip 版本,尝试其中一个(或两者)
sudo -H pip3 install --upgrade pip
sudo -H pip2 install --upgrade pip