django创建数据库时报错django.core.exceptions.ImproperlyConfigured: mysqlclient 1.4.3 or newer is required

django创建数据库时报错django.core.exceptions.ImproperlyConfigured: mysqlclient 1.4.3 or newer is required
解决办法:在settings的同目录下的__init__.py里面加入如下代码:
在这里插入图片描述

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

指定报错的版本即可

猜你喜欢

转载自blog.csdn.net/weixin_43883625/article/details/130167937