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)

    3
    • 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-pythonCommentedJun 5, 2019 at 13:33
    • The github repo of the pypi package has not been updated for 6 years, though...
      – olinox14
      CommentedJun 5, 2019 at 13:35
    • 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.
      – Roberto
      CommentedOct 20, 2019 at 2:11

    Start asking to get answers

    Find the answer to your question by asking.

    Ask question

    Explore related questions

    See similar questions with these tags.