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

相关推荐
小鸡吃米…1 小时前
机器学习中的代价函数
人工智能·python·机器学习
Li emily2 小时前
如何通过外汇API平台快速实现实时数据接入?
开发语言·python·api·fastapi·美股
m0_561359672 小时前
掌握Python魔法方法(Magic Methods)
jvm·数据库·python
Ulyanov2 小时前
顶层设计——单脉冲雷达仿真器的灵魂蓝图
python·算法·pyside·仿真系统·单脉冲
2401_838472513 小时前
使用Python进行图像识别:CNN卷积神经网络实战
jvm·数据库·python
CoLiuRs3 小时前
语义搜索系统原理与实现
redis·python·向量·es
zhihuaba3 小时前
使用PyTorch构建你的第一个神经网络
jvm·数据库·python
u0109272713 小时前
Python Web爬虫入门:使用Requests和BeautifulSoup
jvm·数据库·python
Stream_Silver4 小时前
【Agent学习笔记3:使用Python开发简单MCP服务】
笔记·python
穿过锁扣的风4 小时前
零基础入门 Python 爬虫:从基础到实战,爬取虎扑 / 豆瓣 / 图片全掌握
开发语言·爬虫·python