简体   繁体   English

安装旧版本的python pip

[英]installing older version of python pip

I've got a brand new kubuntu 14.04.01 LTS. 我有一个全新的kubuntu 14.04.01 LTS。 It has only python 2.7 supported. 它仅支持python 2.7。 I need 2.6 for my work. 我的工作需要2.6。 I've found the deadsnakes repositories and I've been able to install python2.6. 我已经找到了Deadsnakes储存库,并且已经能够安装python2.6。 But now I can't find a way to install pip for python 2.6 - how can I do that? 但是现在我找不到安装python 2.6 pip的方法-我该怎么做?


Following @AvishBabu's answer, I downloaded the easy setuptools 2.6 egg, so I have easy_install-2.6, but it's installed inside my /usr/local/lib/python2.7/dist-packages... When I try to install pip for 2.6, I get: 按照@AvishBabu的回答,我下载了easy setuptools 2.6鸡蛋,因此我拥有easy_install-2.6,但它安装在我的/usr/local/lib/python2.7/dist-packages中...当我尝试为2.6安装pip时,我得到:

$ sudo easy_install-2.6 pip
Searching for pip
Best match: pip 1.5.4
Adding pip 1.5.4 to easy-install.pth file
Installing pip script to /usr/local/bin
Installing pip2.7 script to /usr/local/bin
Installing pip2 script to /usr/local/bin

Using /usr/lib/python2.7/dist-packages
Processing dependencies for pip
Finished processing dependencies for pip

which means, that only pip2.7 is taken into account. 这意味着仅考虑pip2.7。

You have to install setuptools for Python 2.6 (example : setuptools-0.6c11-py2.6.egg ). 您必须安装适用于Python 2.6的setuptools(例如: setuptools-0.6c11-py2.6.egg )。 Then, you have easy_install-2.6 . 然后,您有了easy_install-2.6

You can do: 你可以做:

Use the command 使用命令

easy_install-2.6 pip

For installing the mysql-python, use like pip-2.6 install mysql-python . 要安装mysql-python,请使用pip-2.6 install mysql-python

See reference . 参见参考

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM