1 Django和MySQL不兼容:
【现象】:在命令行中输入py manage.py runserver
后提示出如下错误
raise ImproperlyConfigured('mysqlclient 1.3.13 or newer is required; you have %s.' % Database.__version__)
django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3.
这是因为Django对于mysql是不兼容的,而且你应该已经下载了pymysql
【解决】:
- 首先确定你在__init.py__文件中有输入如下代码:
import pymysql
pymysql.install_as_MySQLdb()
- 其次找到出现问题的文件