Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

yum install python-pip:No package python-pip available

Tags:

python

pip

yum

After updating python from 2.5 to 2.7.6 in RedHat 4.2, I tried to use yum to install python pip. However, error occurs:

[gz@pl1 ~]$ sudo yum install python-pip
updates-newkey                                           | 2.3 kB     00:00
fedora                                                   | 2.1 kB     00:00
updates                                                  | 2.6 kB     00:00
Setting up Install Process
Parsing package install arguments
No package python-pip available.
Nothing to do 

I wonder why? Some say I should

turn on EPEL repo

first, but how?

Unfortunately, even though I "python get-pip.py" manually, it didn't work either. The error was:

Traceback (most recent call last):
File "get-pip.py", line 7219, in <module>
  import bz2
ImportError: No module named bz2

However, bz2 was there which bzip2-devel /usr/bin/which: no bzip2-devel in (/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/gz/bin)

And my reference comes from: http://www.pip-installer.org/en/latest/installing.html

Thanks for any tip!

like image 361
user2358561 Avatar asked Nov 11 '22 14:11

user2358561


1 Answers

I'm going to assume there's a reason you're using RHEL 4.2. In general, you install an RPM to add the EPEL repo although you can also just pull down the repo info file; assuming you're using a 32bit version of RHEL 4.2, I believe you want the one at http://dl.fedoraproject.org/pub/epel/4/i386/epel-release-4-10.noarch.rpm (if you're using 64-bit or powerpc or whatever, I'd suggest going to http://dl.fedoraproject.org/pub/epel/4/ and navigating accordingly)

(So download the RPM, and then install it)

like image 170
Foon Avatar answered Nov 15 '22 05:11

Foon