如何为python 2.6安装pip?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24294467/
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 install pip for python 2.6?
提问by amphibient
I tried following the instructions from this answerbut easy_install-2.6
could not find pip
:
我尝试按照此答案中的说明进行操作,但easy_install-2.6
找不到pip
:
>sudo easy_install-2.6 pip
Processing pip
error: Not a recognized archive type: pip
How do I install pip for python 2.6?
如何为 python 2.6 安装 pip?
My root need for pip for 2.6 is explained in this thread.
这个线程中解释了我对 2.6 pip 的根本需求。
采纳答案by MattDMo
Just follow the instructions here:
只需按照此处的说明操作:
- Securely download
get-pip.py
(this is the 2.6-specific file, link from Ricardo Iramar's answer). In the directory you saved
get-pip.py
, runsudo python2.6 get-pip.py
and you'll be all set.
- 安全下载
get-pip.py
(这是特定于 2.6 的文件,来自 Ricardo Iramar's answer 的链接)。 在您保存的目录中
get-pip.py
,运行sudo python2.6 get-pip.py
一切准备就绪。
This will install pip
for Python 2.6, and won't touch your version 2.7 installation.
这将为pip
Python 2.6安装,并且不会影响您的 2.7 版安装。
回答by DavidK
回答by tsingroo
on fedora/centos system, just use
在 fedora/centos 系统上,只需使用
yum install python-pip
on other linux system,use yum-like install tool
在其他 linux 系统上,使用类似 yum 的安装工具
on window ,use the other solutions under this question
在窗口上,使用此问题下的其他解决方案
回答by Ricardo.Iramar
Find below the steps to install pip on Python 2.6.X:
在 Python 2.6.X 上安装 pip 的步骤如下:
$ curl https://bootstrap.pypa.io/2.6/get-pip.py -o get-pip.py
$ python get-pip.py