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
Similar Posts:
- [Solved] Error when connecting to MySQL when creating Django project
- [Solved] Django Error: Did you install mysqlclient?
- Django: How to Solve Using Pymysql Error
- How to Solve Django Error: No module named ‘MySQLdb’
- django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named ‘M…
- [Solved] peewee error: ImportError: No module named ‘MySQLdb’;pymysql error: from . import connections # noqa: E402
- python mac install MySQLdb ModuleNotFoundError No module named ‘ConfigParser’
- [Solved] Django cannot create an app after creating a project
- ImportError: No module named pytz
- ImportError: Couldn’t import Django [How to Solve]