Command errored out with Exit status 1: python setup.py egg_info

Asked

Viewed 13,445 times

2

What’s up, you guys? I was trying to run the remote pip install MySQL-python and the console returned me this error:

ERROR: Command errored out with exit status 1:
 command: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/65/jkyt0ypj7mj7686wbsw_p1_m0000gn/T/pip-install-cis2n2x_/MySQL-python/setup.py'"'"'; __file__='"'"'/private/var/folders/65/jkyt0ypj7mj7686wbsw_p1_m0000gn/T/pip-install-cis2n2x_/MySQL-python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
     cwd: /private/var/folders/65/jkyt0ypj7mj7686wbsw_p1_m0000gn/T/pip-install-cis2n2x_/MySQL-python/
Complete output (7 lines):
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/private/var/folders/65/jkyt0ypj7mj7686wbsw_p1_m0000gn/T/pip-install-cis2n2x_/MySQL-python/setup.py", line 13, in <module>
    from setup_posix import get_config
  File "/private/var/folders/65/jkyt0ypj7mj7686wbsw_p1_m0000gn/T/pip-install-cis2n2x_/MySQL-python/setup_posix.py", line 2, in <module>
    from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py 
egg_info Check the logs for full command output.

Does anyone know how to help me ? I have tried the following solutions:

  1. pip install -U setuptools
  2. brew reinstall python
  3. sudo pip install MySQL-python

And nothing is working. Thanks in advance.

1 answer

3


Oops, so man the error that is returning there that deserves attention is as follows:

ModuleNotFoundError: No module named 'ConfigParser'

And there may be reasons for that. The most likely would be that in Python 3, the 'Configparser' was renamed to 'configparser' for PEP 8. So it seems that the package you are trying to install is not compatible with Python 3, so we have an alternative:

You can use the package mysqlclient as an alternative to being a "version" of MySQL-python with Python 3 support. Then just download this package with:

pip install mysqlclient

Browser other questions tagged

You are not signed in. Login or sign up in order to post.