如何为python 2.6安装pip?

2024-04-26 15:12:31 发布

您现在位置:Python中文网/ 问答频道 /正文

我尝试按照this answer中的说明操作,但easy_install-2.6找不到pip

>sudo easy_install-2.6 pip
Processing pip
error: Not a recognized archive type: pip

如何为python 2.6安装pip

this thread中解释了我对2.6的pip的根本需求


Tags: installpipanswertypeeasysudonoterror
3条回答

只需按照说明here

  1. 安全地下载^{}(这是2.6特定的文件,链接自Ricardo Iramar的answer
  2. 在保存的目录get-pip.py中,运行

    sudo python2.6 get-pip.py
    

    你会准备好的

这将为Python2.6安装pip,并且不会影响2.7版的安装

查找以下在Python 2.6.X上安装pip的步骤:

$ curl https://bootstrap.pypa.io/2.6/get-pip.py -o get-pip.py
$ python get-pip.py

在fedora/centos系统上,只需使用

yum install python-pip

在其他linux系统上,使用类似于yum的安装工具

在窗口上,使用此问题下的其他解决方案

相关问题 更多 >