python 3.x 下面install django 之后,用python manage startapp xxx 的时候总是报错:
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Did you install mysqlclient?
查了一下原因,python3 x 下面首先要去install pymysql, 然后我们要在 project 下面的init.py 加上下面的code:
import pymysql
pymysql.install_as_MySQLdb()
然后问题就可以得以解决。