mysqlclient 1.3.13 or newer is required; you have 0.9.3.

django提示错误: django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3.

环境

  • python 3.8
  • django 3.0.1
  • pymysql 0.9.3

解决方法

网上的很多方法是修改Django中base.py代码,注释掉判断MySQL版本的代码部分,其实注释掉后,运行会提示很多异常错误。

这种问题,很有可能是Django版本和pymysql版本不兼容导致的。所以应该根据其提示更新pymysql库:

pip install --upgrade pymysql

本文来自博客园,作者:忞翛,转载请注明原文链接:https://www.cnblogs.com/lczmx/p/14881331.html

原文地址:https://www.cnblogs.com/lczmx/p/14881331.html