The details of the error are as follows:
_MYSQL.C: Fatal error C1083:cannot open include file: ' mysql.h ': No such file or directory
Error:command ' c:\\users\\administrator\\appdata\\local\\programs\\common\\microsoft\\visual C + + for Python\\9.0\\ Vc\\bin\\cl.exe ' failed with exit status 2
It took two hours to get it done. The solution is as follows: (My environment is Win7 64-bit system, python2.7 32-bit version)
1. First put a website https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python, everything is on this site.
2. Install Mysql-python First, that is, download the mysql_python?1.2.5?cp27?none?win32.whl,64-bit download on the above website Mysql_python?1.2.5?cp27?none?win_ AMD64.WHL, and then Pip can (not PIP students themselves Baidu this bar)
3. Then install mysqlclient, download the corresponding version of the WHL file, I use the MYSQLCLIENT?1.3.12?CP27?CP27M?WIN32.WHL, and then Pip
4. Then pip Flask-mysqldb can be
5. Finally paste my success chart, wish everyone success
Python2 installation flask-mysqldb appears fatal error C1083:cannot open include file: ' mysql.h ': No su ch file or directory