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

相关推荐
没有梦想的咸鱼185-1037-16631 分钟前
解锁空间数据新质生产力暨:AI(DeepSeek、ChatGPT)、Python、ArcGIS Pro多技术融合下的空间数据分析、建模与科研绘图及论文写作
人工智能·python·深度学习·机器学习·arcgis·chatgpt·数据分析
z_mazin1 小时前
用户行为检测技术解析:从请求头到流量模式的对抗与防御
python·网络爬虫
狐凄2 小时前
Python实例题:使用Pvthon3编写系列实用脚本
java·网络·python
懵逼的小黑子2 小时前
解释两个 Django 命令 makemigrations和migrate
数据库·django
fish_study_csdn7 小时前
pytest 技术总结
开发语言·python·pytest
咖啡调调。7 小时前
使用Django框架表单
后端·python·django
BO_S__7 小时前
python调用ffmpeg对截取视频片段,可批量处理
python·ffmpeg·音视频
就叫飞六吧8 小时前
如何判断你的PyTorch是GPU版还是CPU版?
人工智能·pytorch·python
pyengine9 小时前
基于pandoc的MarkDown格式与word相互转换小工具开发(pyqt5)
开发语言·python·qt·word
YuSun_WK9 小时前
配置MambaIRv2: Attentive State Space Restoration的环境
开发语言·python