1

I am on shared hosting and I need to install pip with the correct python version, 2.7. To install pip, I did:

$ easy_install pip

However, after it was installed I get the following:

[dave@web1 lib]$ pip --version
pip 1.0.2 from /home/premiere/dave/financials/lib/pip-1.0.2-py2.7.egg (python 2.4)

How would I re-install pip to work on the python2.7 version, which is also installed on the machine?

[premiered@web1 ~]$ python --version
Python 2.6.6

Which is strange, since it is installing to python2.4.

3
  • 1
    What do you get when you type python --version? Commented Jan 27, 2012 at 2:23
  • 2.6.6. I added this in the question Commented Jan 27, 2012 at 2:25
  • No it DOES NOT installed to python2.4, but correctly 2.7, according to -py2.7.egg :) Commented Jan 27, 2012 at 2:28

2 Answers 2

1

You may want to create a virtualenv using -p /path/to/python-2.7.binary param, and then activate it. Then all stuff you installed using pip would be correctly into your virtualenv.

Sign up to request clarification or add additional context in comments.

2 Comments

How do I find where my python binary is?
By default all python binaries are inside /usr/bin, such as /usr/bin/python2.7. If you are able to run python2.7 from terminal, you should be able to use which python2.7 to get its location :)
0

If multiple versions of python are installed on the system, then you should invoke the version you want when installing. i.e.

$ python27 easy_install pip

This creates a pip file in your path that contains the specified version of python in the hashBang line.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.