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...
1
  • Where is pip and is it a link to a versioned pip e.g. pip-2.5? Commented Apr 4, 2011 at 12:28

1 Answer 1

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
Sign up to request clarification or add additional context in comments.

3 Comments

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.
I tried easy_install-2.6 pip but got error: Not a recognized archive type: pip
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.