When changing the config to use MySQL as database I'm getting an error trying to start Django server (python manage.py runserver) It is asking me if I installed mysqlclient which I finally was able to do after some digging around on SO. The error it ends with is:
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
High up in the Traceback it states that this exception is causing another exception:
Traceback (most recent call last):
File "/Users/username/PycharmProjects/projectname/venv/lib/python3.6/site-packages/django/db/backends/mysql/base.py", line 15, in <module>
import MySQLdb as Database
File "/Users/username/PycharmProjects/projectname/venv/lib/python3.6/site-packages/MySQLdb/__init__.py", line 18, in <module>
import _mysql
ImportError: dlopen(/Users/username/PycharmProjects/projectname/venv/lib/python3.6/site-packages/_mysql.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libssl.1.0.0.dylib
Referenced from: /Users/username/PycharmProjects/projectname/venv/lib/python3.6/site-packages/_mysql.cpython-36m-darwin.so
Reason: image not found
There are many questions similar to this and I tried quite a bit but can't seem to get this to work. I tried adding MySQLdb as package directly, but then I get the error:
Could not find a version that satisfies the requirement MySQLdb (from versions: ) No matching distribution found for MySQLdb
As said; mysqlclient is installed. Any ideas?