Home > Backend Development > Python Tutorial > Django reports that there is no module MySQLdb under Python 3.5.

Django reports that there is no module MySQLdb under Python 3.5.

怪我咯
Release: 2017-06-27 09:47:17
Original
1759 people have browsed it

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()
Copy after login

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!

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
python3.5 - c++ calls python36
From 1970-01-01 08:00:00
0
0
0
python3.5 urllib.parse.unquote garbled code
From 1970-01-01 08:00:00
0
0
0
win10 python3.5 matplotlib usage error
From 1970-01-01 08:00:00
0
0
0
Help python install mysql module error
From 1970-01-01 08:00:00
0
0
0
python3.x - How does git bash run .bat files?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template