Since many related dependent packages were unloaded when MySQL was unloaded, the following error occurred when Django was started after reloading MySQL:
django.core.exceptions.ImproperlyConfigured:Error loading MySQLdb module: No module named 'MySQLdb".
Did you install mysqlclient or MySQL-python?
Due to the development of Python version 3.6.4, mysql-python does not support python3, after a lot of trouble to install mysqlclient
The following is my process to solve the problem, I am lazy, I will show you in the form of pictures
First of all, I tried to install MySQL python, but there was an error. The following is the solution for online search:
Here’s how I found the solution and installed mysqlclient:
The following is the code to install mysqlclient and its dependent environment:
pip install mysqlclient
sudo apt-get install python3-dev libmysqlclient-dev
When there is a problem with no module named ‘MySQL db’. It is recommended to install mysqlclient. MySQL Python does not support python3
- [How to Solve] ImportError: No module named MySQLdb
- [Solved] Error when connecting to MySQL when creating Django project
- [Solved] Python import module error: importerror: no module named mysql.connector
- Error in Python compilation on MAC no module named mysqldb
- Django: How to Solve Using Pymysql Error
- CentOS 7: How to Solve Mysqlclient Install Error
- Linux Error: _mysql.c:32:20: fatal error: Python.h: No such file or directory [Solved]
- MySQL_python‑1.2.5‑cp27‑none‑win_amd64.whl is not a valid wheel filename.
- django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named ‘M…
- python mac install MySQLdb ModuleNotFoundError No module named ‘ConfigParser’