Can not get mysql-connector-python to install in virtualenv

Several things. There is an inconsistency in package naming so you may want to do:

pip search mysql-connector

to find out what it is called on your platform. I got two results mysql-connector-python and mysql-connector-repackaged.

so try this first:

pip install mysql-connector-python

this may additionally give an error like this:

Some externally hosted files were ignored (use 
    --allow-external mysql-connector-python to allow).

so finally this should do the job:

pip install mysql-connector-python --allow-external mysql-connector-python

pip install mysql-connector

This worked for me!


Solution I found:

sudo pip install mysql-connector-python-rf

If you see this error: option --single-version-externally-managed not recognized, try this:

sudo pip install --egg mysql-connector-python-rf

Tags:

Python

Mysql