0

Sytem :MAC OS 10.13

Python 3.7

import MySQLdb <BR>
Traceback (most recent call last):<BR>
  File "<stdin>", line 1, in <module><BR>
  File <BR>"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/MySQLdb/__init__.py", line 18, in <module><BR>
    import _mysql<BR>
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/_mysql.cpython-37m-darwin.so, 2): Symbol not found: _syslog$DARWIN_EXTSN<BR>
  Referenced from: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
  Expected in: /usr/lib/libSystem.B.dylib
 in /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib

And when I try this:

pip install MySQL-python

Output:

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/r3/l2jk9m3d3497b902lbnkzcz40000gn/T/pip-install-q5k3f7m1/MySQL-python/setup.py", line 13, in <module>
        from setup_posix import get_config
      File "/private/var/folders/r3/l2jk9m3d3497b902lbnkzcz40000gn/T/pip-install-q5k3f7m1/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/r3/l2jk9m3d3497b902lbnkzcz40000gn/T/pip-install-q5k3f7m1/MySQL-python/

I spend 3 days in this errors Can you help me please, Thank you very much

davidism
  • 121,510
  • 29
  • 395
  • 339

1 Answers1

0

Looks like the problem is that MySQLdb does not support python 3 Python 3 ImportError: No module named 'ConfigParser' there is an answer here that says to try using mysqlclient https://stackoverflow.com/a/23978968/5446449 because it supports python 3. Hope this helps

James Russo
  • 578
  • 3
  • 18