0

I installed Python 2.6 and pip on centos 6.4. I also upgraded python to 2.7.6 and updated bashrc to reference 2.7.6 for the python command.

Pip however, remains under 2.6 and any attempt to reinstall it with 2.7.6 just tells me there's nothing to do as it's already install. How can I install pip under 2.7.6?

I've also tried installing pip with get-pip.py but this is not failing as zlib is not available despite having installed zlib.

How can I install pip under 2.7.6?enter image description here

7
  • 1
    Have you tried yum install python2-pip? – Alexander Tolkachev Aug 3 '17 at 13:31
  • This also tells me there's Nothing to do yet python27-pip command is still not found – Fraser Aug 3 '17 at 13:34
  • 1
    Sorry, I updated comment. – Alexander Tolkachev Aug 3 '17 at 13:34
  • Same again unfortunately Error: Nothing to do – Fraser Aug 3 '17 at 13:36
  • Show output for ls -l /usr/bin/pip* – Alexander Tolkachev Aug 3 '17 at 13:36
1

You have strange problem. As we discussed in chat try to install pip by curl https://bootstrap.pypa.io/get-pip.py | python2.7 -.

Then create file /usr/bin/pip2.7 and fill it with:

#!/bin/python2.7

# -*- coding: utf-8 -*-
import re
import sys

from pip import main

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(main())

Make it executable chmod +x /usr/bin/pip2.7 and run it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.