5

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/

1 Answer 1

1

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)

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks for your suggestion and will try, but the pip way installation should be fine as it is also suggested by pypi, which can refer to pypi.org/project/MySQL-python
The github repo of the pypi package has not been updated for 6 years, though...
In my opinion, this answer should have been accepted. The recommended dev download worked for me (without additional Visual downloads required), while pip did not.

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.