14

I am trying to install mysql-python using:

pip install mysql-python

the package is being installed below, although I already have Python 2.6 on the system.

/Library/Python/2.5/site-packages

How can I get pip to install in:

/Library/Python/2.6/site-packages

I tried using:

pip install --install-option="--prefix=/Library/Python/2.6/site-packages/" mysql-python

but that didn't work and it outputs:

    Requirement already satisfied (use --upgrade to upgrade): mysql-python in 
    /Library/Python/2.5/site-packages
    Cleaning up...
Bach
  • 2,684
  • 5
  • 26
  • 36

1 Answers1

27

You should have pip-2.6. If you don't have pip version 2.6 :

You have to install setuptools for Python 2.6 (example : setuptools-0.6c11-py2.6.egg). Then, you have easy_install-2.6. You can do :

easy_install-2.6 pip

Finally, you have pip version 2.6. To install mysql-python :

pip-2.6 install mysql-python
Sandro Munda
  • 39,921
  • 24
  • 98
  • 123
  • I did `easy_install-2.6 pip` and that ran fine. However, `pip-2.6` fails for me with `ImportError: Entry point ('console_scripts', 'pip-2.6') not found`. – Albert Feb 25 '13 at 16:30
  • I tried `easy_install-2.6 pip` but got `error: Not a recognized archive type: pip` – amphibient Jun 18 '14 at 20:20
  • To me, after running easy_install-2.6 pip, the command is "pip2.6", instead of "pip-2.6". The additional hyphen can be tricky. – fanchyna Jan 09 '16 at 14:48