Environment pycharm2021.1.1+python3.7+django3.2.11
When testing the project, I opened the python console and got django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
The driver is fine, the database configuration is fine, and __init__.py has added this
import pymysql
pymysql. install_as_MySQLdb()
Solution: PIP – M install mysqlclient