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

报错信息:

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

解决方案:

在settings.py的同路径下的__init__.py加入以下内容

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

  

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

上一篇:docker安装mysql


下一篇:在windows上安装mysql