Django - 使用 pymysql 时报错
django 项目中 __init__.py 的代码为:
运行项目,报错
django.core.exceptions.ImproperlyConfigured: mysqlclient 1.4.0 or newer is required; you have 0.7.11.None.
解决方法:
__init__.py:
import pymysql pymysql.version_info = (1, 4, 13, "final", 0) pymysql.install_as_MySQLdb()