1

I am attempting to install pip on RHEL.

When I run:

[root@somewhere ~]# python get-pip.py
Traceback (most recent call last):
  File "get-pip.py", line 20204, in <module>
    main()
  File "get-pip.py", line 152, in main
    bootstrap(tmpdir=tmpdir)
  File "get-pip.py", line 82, in bootstrap
    import pip
  File "/tmp/tmpydnX0u/pip.zip/pip/__init__.py", line 15, in <module>

  File "/tmp/tmpydnX0u/pip.zip/pip/vcs/mercurial.py", line 11, in <module>
  File "/tmp/tmpydnX0u/pip.zip/pip/download.py", line 30, in <module>
  File "/tmp/tmpydnX0u/pip.zip/pip/_vendor/__init__.py", line 81, in load_module

ImportError: No module named 'pip._vendor.requests'

It seems this error was caused by OpenSSL not being installed when python was installed. I have now installed OpenSSL, and want to re-compile python so that PIP will work.

It seems I'm supposed to go:

./configure
make
make install

from the python source folder, which in my case I think is /usr/local/lib/python2.7 (?) (It's certainly full of lots of *.py files)

However, I don't have a ./configure file in this folder (and can't find one anywhere else.)

How can I tell if I have what I need to do the re-compile?

cagcowboy
  • 1,064
  • 1
  • 14
  • 21
  • 3
    Stop what you're doing right now. Do not attempt to recompile Python or pip. RHEL is heavily dependent on Python and if you make a mistake you will wind up with a broken system. Just install the already existing packages. – Michael Hampton Apr 24 '15 at 16:36
  • Try (as root or sudo) rpm -qa | grep python -- What do you find? – gview Apr 24 '15 at 16:52
  • @MichaelHampton I have stopped! Please can you elaborate on what/how I should "install the already existing packages."? (I can make this a new question if you prefer.) Thanks! – cagcowboy Apr 25 '15 at 10:45
  • `yum install python-pip` – Michael Hampton Apr 25 '15 at 17:28

0 Answers0