Django——启动项目时报错mysqlclient
报错内容如下:
Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
File "D:\Users\user\AppData\Local\Programs\Python\Python39\lib\threading.py", line 954, in _bootstrap_inner
self.run()
File "D:\Users\user\AppData\Local\Programs\Python\Python39\lib\threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File "D:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\django\utils\autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "D:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management\commands\runserver.py", line 110, in inner_run
autoreload.raise_last_exception()
File "D:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\django\utils\autoreload.py", line 87, in raise_last_exception
raise _exception[1]
File "D:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management\__init__.py", line 375, in execute
autoreload.check_errors(django.setup)()
File "D:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\django\utils\autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "D:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\django\__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "D:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\django\apps\registry.py", line 114, in populate
app_config.import_models()
File "D:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\django\apps\config.py", line 301, in import_models
self.models_module = import_module(models_module_name)
File "D:\Users\user\AppData\Local\Programs\Python\Python39\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "D:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\django\contrib\auth\models.py", line 3, in <module>
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
File "D:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\django\contrib\auth\base_user.py", line 48, in <module>
class AbstractBaseUser(models.Model):
File "D:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\models\base.py", line 122, in __new__
new_class.add_to_class('_meta', Options(meta, app_label))
File "D:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\models\base.py", line 326, in add_to_class
value.contribute_to_class(cls, name)
File "D:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\models\options.py", line 207, in contribute_to_class
self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
File "D:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\django\utils\connection.py", line 15, in __getattr__
return getattr(self._connections[self._alias], item)
File "D:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\django\utils\connection.py", line 62, in __getitem__
conn = self.create_connection(alias)
File "D:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\utils.py", line 204, in create_connection
backend = load_backend(db['ENGINE'])
File "D:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\utils.py", line 111, in load_backend
return import_module('%s.base' % backend_name)
File "D:\Users\user\AppData\Local\Programs\Python\Python39\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "D:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\backends\mysql\base.py", line 36, in <module>
raise ImproperlyConfigured('mysqlclient 1.4.0 or newer is required; you have %s.' % Database.__version__)
django.core.exceptions.ImproperlyConfigured: mysqlclient 1.4.0 or newer is required; you have 0.9.1.
解决方式: pymysql.version_info = (1, 4, 13, "final", 0)
Django——启动项目时报错mysqlclient的更多相关文章
- npm install含义 及vue安装启动项目时报错解决及vue建项目时各文件间的依赖关系
全局安装vue-cli,使用命令npm install -g vue-cli. 下载模板代码,使用命令vue init webpack my-project,之后会有一些询问,按需填写即可. 最后会看 ...
- maven启动项目时报错
java.lang.UnsupportedClassVersionError eclipse中使用maven插件的时候,运行run as maven build的时候报错 -Dmaven.multiM ...
- 启动spring boot项目时报错:java.lang.ClassNotFoundException: javax.servlet.Filter
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring- ...
- Tomcat 启动项目报错 java.lang.OutOfMemoryError: Java heap space
近日使用myeclipse 部署web项目,启动tomcat时报错: SEVERE: Error waiting for multi-thread deployment of directories ...
- MyEclipse 启动tomcat时报错:Cannot change deployment state from ERROR to REDEPLOYING.ds
myeclipse 启动tomcat时报错:Cannot change deployment state from ERROR to REDEPLOYING.ds - 刘琦的专栏 - 博客频道 - C ...
- 【原创】大叔经验分享(57)hue启动coordinator时报错
hue启动coordinator时报错,页面返回undefinied错误框: 后台日志报错: runcpserver.log [13/May/2019 04:34:55 -0700] middlewa ...
- Debug运行项目时报错,connected to the target VM, address: '127.0.0.1:50495', transport: 'socket'
Debug运行项目时报错,无法进入Debug,猜想出错原因可能是未正确关闭IDEA. 解决方法,先直接运行项目,然后停掉项目,再用Debug模式启动,问题解决.
- tomcat7 启动项目报错 java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()
JDK版本:jdk1.8.0_77 Tomcat 版本:apache-tomcat-7.0.47 异常重现步骤: 1.完成项目部署 2.启动Tomcat 异常头部信息:java.lang.NoSuch ...
- 使用IDEA自带maven建java项目时报错。
今天用IDEA建立maven项目时报错: [INFO] Scanning for projects... [INFO] Searching repository for plugin with pre ...
- 使用 Gradle 编译 Java 项目时报错: Could not find Tools.jar
在使用Android studio进行编译成jar的时候,遇到Gradle 编译错误,听前辈们说是jdk的版本不对,于是乎就更新了一下jdk, 然而可能是我重新安装jdk的时候改变了安装路径, 在pr ...
随机推荐
- openGauss资源池化开发者入门指南(二)
openGauss 资源池化开发者入门指南(二) 一.内容简介 openGauss 资源池化是 openGauss 推出的一种新型的集群架构.通过 DMS 和 DSS 组件,实现集群中多个节点的底层存 ...
- 为你推荐一款高效的IO组件——okio
原文:https://mp.weixin.qq.com/s/XnNhSq8ESoslb2DQEzMbCQ,点击链接查看更多技术内容. 前不久,三方组件库上新了一批JS/eTS组件,其中就包括oki ...
- 深入理解DES算法:原理、实现与应用
title: 深入理解DES算法:原理.实现与应用 date: 2024/4/14 21:30:21 updated: 2024/4/14 21:30:21 tags: DES加密 对称加密 分组密码 ...
- Pytorch DistributedDataParallel(DDP)教程二:快速入门实践篇
一.简要回顾DDP 在上一篇文章中,简单介绍了Pytorch分布式训练的一些基础原理和基本概念.简要回顾如下: 1,DDP采用Ring-All-Reduce架构,其核心思想为:所有的GPU设备安排在一 ...
- 常用注解使用总结系列: @Order 注解
@Order 注解 @Order注解主要用来控制配置类的加载顺序示例代码: package com.runlion.tms.admin.constant; public class AService ...
- 给蚂蚁金服 antv 提个 PR, 以为是改个错别字, 未曾想背后的原因竟如此复杂!
前言 什么? 你不了解G2Plot? 没关系, 今天咱们要分享的内容和G2Plot的关系, 就像雷锋和雷峰塔的关系. 因此, 不必担心听不懂. 我一直觉得, 如果我写的文章有人看不懂, 那一定是我写的 ...
- 揭秘 RocketMQ 新特性以及在金融场景下的实践
2019 年末, RocketMQ 正式发布了 4.6.0 版本,增加了" Request-Reply "的同步调用的新特性." Request-Reply " ...
- Go语言入门分享
简介: Go语言出自Ken Thompson.Rob Pike和Robert Griesemer之手,起源于2007年,并在2009年正式对外发布.Go的主要目标是"兼具Python等动态 ...
- [FAQ] puppeteer 清空输入框的值 并 重新输入
一种方式是,清空输入框可以通过如下注入代码实现,但是可能存在 和页面本身的操作 存在优先级问题. await page.evaluate( () => document.getElementBy ...
- [Kali] Kali 信息收集
网络空间测绘. 网络空间测绘是2016年出现的一个概念,主要指用一些技术方法,来探测全球互联网空间上的节点分布情况和网络关系索引,构建全球互联网图谱的一种方法. nmap端口扫描. 子域名爆破. ...