mysqlclient在django启动时报错: Did you install mysqlclient?

C:\Users\86188\AppData\Local\Programs\Python\Python39\python.exe D:\dj\mysite\manage.py runserver 8000
Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
File “C:\Users\86188\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\backends\mysql\base.py”, line 15, in
import MySQLdb as Database
ModuleNotFoundError: No module named ‘MySQLdb’

The above exception was the direct cause of the following exception:

Did you install mysqlclient?

别在那里瞎安装了,直接去setting(设置)里搜索mysqlclient点击安装
mysqlclient在django启动时报错: Did you install mysqlclient?_第1张图片

你可能感兴趣的:(django,python)