4

I am new to python, I have changed my path to point to the new python 2.7, but pip and easy_install, and mercurial are still looking at the default installed version 2.6. How do I fix this?

Joey Blake
  • 3,451
  • 2
  • 18
  • 16
  • Thanks, that did it, still need to change the path to the homebrew directory. For anyone else who finds this. – Joey Blake Apr 07 '11 at 19:33
  • Joey: I still have the same problem... can you elaborate shortly on that part? (i.e. change the path to the homebrew directory) – Henrik Nov 02 '11 at 03:06

2 Answers2

5

You need to install pip and setuptools again (which provides the easy_install command) for your new version of Python. pip and setuptools are not globally installed, rather they must be installed specifically for each version of Python on your system.

To install pip:

$ curl -O https://github.com/pypa/pip/raw/master/contrib/get-pip.py
$ python get-pip.py

To install setuptools:

$ curl -O http://peak.telecommunity.com/dist/ez_setup.py
$ python ez_setup.py

… but you should probably be using Distribute (it's a newer version of setuptools):

$ curl -O http://python-distribute.org/distribute_setup.py
$ python distribute_setup.py
bradley.ayers
  • 37,165
  • 14
  • 93
  • 99
  • For those who stumble across this answer today (2 years later), I would `curl -O -L https://github.com/pypa/pip/raw/master/contrib/get-pip.py` (-L is 'follow http redirect') – Josh Whittington Aug 29 '13 at 02:21
4

You have to re-install easy_install using Python 2.7 and all other modules as well. Don't expect that existing packages installed with a different interpreter are supposed to work out of the box with a new interpreter. Reinstalling into the new Python 2.7 interpreter is the way to go. First step: reinstall easy_install by downloading ez_setup.py (Google) and running it with the 2.7 interpreter..