Python3.6 用Django连接MySQL一直报错django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.3 or newer is required; you have 0.7.11.None
百度好久没解决 ,不知道在哪看到了一个解决方法 贴出来。
错误
django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.3 or newer is required; you have 0.7.11.None
通过查找路径C:ProgramsPythonPython36-32Libsite-packagesDjango-2.0-py3.6.eggdjangodbackendsmysql
这个路径里的文件把
if version < (1, 3, 3):
raise ImproperlyConfigured("mysqlclient 1.3.3 or newer is required; you have %s" % Database.__version__)
注释掉 就行了
1.先设置setting.py里面的配置
2.安装python的mysql驱动
3.到站点下的init文件加载
import pymysql
pymysql.install_as_MySQLdb()