I have some problem. I try to connect my Django project with mysqldb. I use python3.5 + Django + OSX. When i install python package mysqlclient (pip3 install mysqclient) and starting my project i get error:
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb
module: dlopen(/lib/python3.5/site-packages/_mysql.cpython-35m-
darwin.so, 2): Symbol not found: _mysql_affected_rows
What does it mean? How can i fix this error. I try to reinstall mysqlclient, update mysql - nothing helps.
MySQLdb does not support Python 3. Fortunately, there are other engines you can use. Please see here:
https://docs.djangoproject.com/en/1.11/ref/databases/#mysql-db-api-drivers
I would recommend mysqlclient
, which is a drop-in replacement for MySQLdb:
https://pypi.python.org/pypi/mysqlclient
Good luck!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.