1

I tried to install mysql-python by using:

pip3 install mysql-python

Collecting mysql-python Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "/private/var/folders/lw/4nw2sv5d4_n59wp2j79gn8gr0000gn/T/pip-install-e27w2zbw/mysql-python/setup.py", line 13, in from setup_posix import get_config File "/private/var/folders/lw/4nw2sv5d4_n59wp2j79gn8gr0000gn/T/pip-install-e27w2zbw/mysql-python/setup_posix.py", line 2, in from ConfigParser import SafeConfigParser ModuleNotFoundError: No module named 'ConfigParser'

Command "python setup.py egg_info" failed with error code 1 in

/private/var/folders/lw/4nw2sv5d4_n59wp2j79gn8gr0000gn/T/pip-install-e27w2zbw/mysql-python/

or

pip install mysql-python

EPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. Collecting mysql-python Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "/private/var/folders/lw/4nw2sv5d4_n59wp2j79gn8gr0000gn/T/pip-install-YPYuVV/mysql-python/setup.py", line 17, in metadata, options = get_config() File "setup_posix.py", line 53, in get_config libraries = [ dequote(i[2:]) for i in libs if i.startswith(compiler_flag("l")) ] File "setup_posix.py", line 8, in dequote if s[0] in "\"'" and s[0] == s[-1]: IndexError: string index out of range

Command "python setup.py egg_info" failed with error code 1 in

/private/var/folders/lw/4nw2sv5d4_n59wp2j79gn8gr0000gn/T/pip-install-YPYuVV/mysql-python/

I tried some solutions:

pip install --upgrade setuptools

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. Requirement already up-to-date: setuptools in /Library/Python/2.7/site-packages (40.8.0)

pip3 install --upgrade setuptools

Requirement already up-to-date: setuptools in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (40.8.0)

but they dont work.

Twitter khuong291
  • 11,328
  • 15
  • 80
  • 116

0 Answers0