Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error occurred when running pip install mysql-python: "python setup.py egg_info" failed with error code 1

Running pip install mysql-python gives "python setup.py egg_info" failed with error code 1 issue

Tried pip install -U setuptools to update the setuptools to the latest version, which gets 'Requirement already up-to-date: setuptools in ./2.7/lib/python2.7/site-packages'.

Also tried python -m pip install --upgrade setuptools which should be the same function as above.

Also tried to run brew install mysql-connector-c and then run pip install mysql-python, but still not working.

ERROR: Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/_0/9_462vd15jgg2s365ldbgt440000gn/T/pip-install-_gamvb3n/mysql-python/

like image 469
user3651247 Avatar asked Nov 07 '22 16:11

user3651247


1 Answers

I do not think you can install mysql-python with pip...

Try to download the connector from here and install it: https://dev.mysql.com/downloads/connector/python/

You may also need to install Microsoft Visual C++ 14.0 (but I'm not 100% sure of that)

like image 174
olinox14 Avatar answered Nov 15 '22 10:11

olinox14