Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pip installing into an older Python version

Tags:

python

pip

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...
like image 946
Bach Avatar asked Apr 04 '11 12:04

Bach


People also ask

Is pip linked to Python version?

PIP is a package manager for Python packages, or modules if you like. Note: If you have Python version 3.4 or later, PIP is included by default.

Does Python 3.8 have pip?

The current version of pip works on: Windows, Linux and MacOS. CPython 3.7, 3.8, 3.9, 3.10 and latest PyPy3.

Does Python 3.8 5 have pip?

Their Python distros don't include pip by default.


1 Answers

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
like image 110
Sandro Munda Avatar answered Sep 21 '22 14:09

Sandro Munda