Home > Article > Backend Development > Django reports that there is no module MySQLdb under Python 3.5.
Write the following code in the __init__.py file under the entire project site (that is, in the same file as setting.py):
import pymysql pymysql.install_as_MySQLdb()
You need to install the pymysql module in advance , equivalent to the MySQLdb module in Python2.
will solve the problem.
The above is the detailed content of Django reports that there is no module MySQLdb under Python 3.5.. For more information, please follow other related articles on the PHP Chinese website!