Django报错 | “django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3.问题解决方案
1 问题分析
django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3.
解读:django.core.exceptions.ImproperlyConfigured:需要mysqlclient 1.3.13或更高版本; 您有0.9.3。
言下之意就是您的mysqlclient版本较低,需要更新
2 解决(linux系统下)
2.1 找到相关文件的路径
笔者本机地址为(您可以参考这来寻找):
"/home/bert/.virtualenvs/nami_py3/lib/python3.6/site-packages/django/db/backends/mysql/base.py",
2.2 修改base.py相关内容
即如下进行注释:
# version = Database.version_info
# if version < (1, 3, 13):
# raise ImproperlyConfigured('mysqlclient 1.3.13 or newer is required; you have %s.' % Database.__version__)