如何为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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 04:23:35  来源:igfitidea点击:

How to install pip for python 2.6?

pythonpipeasy-install

提问by amphibient

I tried following the instructions from this answerbut easy_install-2.6could 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:

只需按照此处的说明操作:

  1. Securely download get-pip.py(this is the 2.6-specific file, link from Ricardo Iramar's answer).
  2. In the directory you saved get-pip.py, run

    sudo python2.6 get-pip.py
    

    and you'll be all set.

  1. 安全下载get-pip.py(这是特定于 2.6 的文件,来自 Ricardo Iramar's answer 的链接)。
  2. 在您保存的目录中get-pip.py,运行

    sudo python2.6 get-pip.py
    

    一切准备就绪。

This will install pipfor Python 2.6, and won't touch your version 2.7 installation.

这将为pipPython 2.6安装,并且不会影响您的 2.7 版安装。

回答by DavidK

From this page : pip

从这个页面:pip

pip works with CPython versions 2.6, 2.7, 3.1, 3.2, 3.3, 3.4 and also pypy.

pip 适用于 CPython 版本 2.6、2.7、3.1、3.2、3.3、3.4 和 pypy。

sudo apt-get install python-pip

回答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