pip安裝python-mysql,出現
>pip install MySQL-python
_mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory error: command '"C:\Users\fnngj\AppData\Local\Programs\Common\Microsoft\Visual C ++ for Python\9.0\VC\Bin\amd64\cl.exe"' failed with exit status 2
解決方法:
1.在http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python下載對應的包版本,如果是win7 64位2.7版本的python,就下載
MySQL_python-1.2.5-cp27-none-win_amd64.whl
然後在命令行執行pip install MySQL_python-1.2.5-cp27-none-win_amd64.whl
當然需要在cmd下跳轉到下載MySQL_python-1.2.5-cp27-none-win_amd64.whl的目錄下
然後就安裝成功了MySQL-python
參考鏈接:https://blog.csdn.net/u012882134/article/details/51934165