I'm trying to use MySQLdb library for Python on a CentOS machine (7.6.1810) inside a Python 3.5.3 virtual environment. I install the library with 'pip install mysqlclient'. Trying to do a "python -c 'import MySQLdb'" I get this error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/srv/myproject/venv/lib/python3.5/site-packages/MySQLdb/__init__.py", line 19, in <module>
    import _mysql
ImportError: /srv/myproject/venv/lib/python3.5/site-packages/_mysql.cpython-35m-x86_64-linux-gnu.so: undefined symbol: mysql_kill

Thank you for your help.

New contributor
rrcc17 is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

rrcc17 is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.