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点击安装

相关推荐
章鱼丸-13 分钟前
DAY31 文件的拆分和写法
开发语言·python
唐叔在学习26 分钟前
Python桌面端应用最小化托盘开发实践
后端·python·程序员
2501_9454235427 分钟前
使用Fabric自动化你的部署流程
jvm·数据库·python
2401_8463416528 分钟前
用Pandas处理时间序列数据(Time Series)
jvm·数据库·python
未知鱼38 分钟前
Python安全开发之子域名扫描器(含详细注释)
网络·python·安全·web安全·网络安全
2401_8318249641 分钟前
编写一个Python脚本自动下载壁纸
jvm·数据库·python
2401_857918291 小时前
Python在2024年的主要趋势与发展方向
jvm·数据库·python
今儿敲了吗1 小时前
python基础学习笔记第九章——模块、包
开发语言·python
二闹1 小时前
Python文件读取三巨头你该选择哪一个?
后端·python
独断万古他化1 小时前
Python+Pytest 接口自动化测试实战 —— 抽奖系统接口测试框架设计与实现
python·pytest·接口自动化·测试·allure·yaml·json schema