使用django开发时,发现安装了mysql和mysql-python还是报错, 可以 init.py 文件中加入以下代码解决: import pymysql pymysql.install_as_MySQLdb() 转自https://blog.csdn.net/fevershen/article/details/81280464