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__)
原文地址:https://www.cnblogs.com/Bert-Sun/p/12568517.html
时间: 2024-10-28 22:03:26