django报错 django.core.exceptions.ImproperlyConfigured: mysqlclient 1.4.0 or newer is required; you ha

django 3.1,Python3.8.2  启动项目报错如下:

django.core.exceptions.ImproperlyConfigured: mysqlclient 1.4.0 or newer is required; you have 0.10.1.

django报错 django.core.exceptions.ImproperlyConfigured: mysqlclient 1.4.0 or newer is required; you ha

 

 

解决

项目的__init__文件加如下内容:

import pymysql
pymysql.version_info = (1, 4, 0, "final", 0)
pymysql.install_as_MySQLdb()

 

上一篇:线程创建方式及线程池使用原理


下一篇:java四种线程池的使用