2

When I try installing mysql-python adaptor with pip3 I get this error message:

$ 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 "<string>", line 1, in <module>
  File "/private/var/folders/vx/gzl69zd16lg9s4_xsgpnldv00000gn/T/pip-build-qkxwtgtw/mysql-python/setup.py", line 13, in <module>
    from setup_posix import get_config
  File "/private/var/folders/vx/gzl69zd16lg9s4_xsgpnldv00000gn/T/pip-build-qkxwtgtw/mysql-python/setup_posix.py", line 2, in <module>
    from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in 
/private/var/folders/vx/gzl69zd16lg9s4_xsgpnldv00000gn/T/pip-build- 
qkxwtgtw/mysql-python/
Michael Brown
  • 141
  • 1
  • 3
  • 7

2 Answers2

0

It says it in the error message:

ModuleNotFoundError: No module named 'ConfigParser'

Python 3 ImportError: No module named 'ConfigParser'

Songtham T.
  • 185
  • 1
  • 2
  • 15
0
  1. ModuleNotFoundError: No module named 'ConfigParser' tells us, that you need ConfigParser to be installed first.

  2. MySQL-python-1.2.5 seems pretty old. Not sure if it supports Python 3. Maybe try https://pypi.python.org/pypi/mysqlclient ?

  3. If you're on Windows, sometimes it helps to download and install from the .whl

ilja
  • 2,592
  • 2
  • 16
  • 23