Django配置mysql报错:
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module. Did you install mysqlclie 与 mysqlclient 1.3.13 or newer is required; you have 0.9.3.
执行 python manage.py startapp app ,创建APP时报错 Error loading MySQLdb module. Did you install mysqlclie
在_init_.py 中添加
import pymysql
pymysql.install_as_MySQLdb()
接着报错 mysqlclient 1.3.13 or newer is required; you have 0.9.3.
修改_init_.py 中代码
import pymysql
pymysql.version_info = (1, 4, 6, 'final', 0)
pymysql.install_as_MySQLdb()
修改后可以成功创建APP~