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:\Programs\Python\Python36-32\Lib\site-packages\Django-2.0-py3.6.egg\django\db\backends\mysql
这个路径里的文件把

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()

相关文章:

  • 2021-10-14
  • 2022-12-23
  • 2021-11-23
  • 2021-11-23
  • 2021-11-23
猜你喜欢
  • 2022-03-01
  • 2021-10-01
  • 2021-09-02
  • 2022-12-23
  • 2021-09-15
  • 2021-06-18
  • 2021-06-13
相关资源
相似解决方案