Install MySQL-python (MySQLdb) failed to solve the problem under python2

You can install PyMySQL (pymysql), "pip install PyMySQL", and then add the code to __init__.py file:

import pymysql
pymysql.install_as_MySQLdb()

 

In addition, python3 no longer supports MySQL-python.

Guess you like

Origin www.cnblogs.com/lucky-heng/p/12632096.html