错误信息
building 'mysql’ extension
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
C:\×××\×××\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Dversion_info=(1,2,5,‘final’,1) -D__version_=1.2.5 “-IC:\Progra
m Files (x86)\MySQL\MySQL Connector C 6.0.2\include” -IC:\Python27\include -Ie:\project\apk_upgrade_cms\venv\PC /Tc_mysql.c /Fobuild\temp.win-amd64-2.7\Release_mysql.obj /Zl
_mysql.c
_mysql.c(42) : fatal error C1083: Cannot open include file: ‘config-win.h’: No such file or directory
error: command ‘C:\×××\×××\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe’ failed with exit status 2
ERROR: Failed building wheel for MySQL-python
解决方法
下载MySQL_python-1.2.5-cp27-none-win_amd64.whl安装就可以了
https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python
安装命令:
easy_install 路径/MySQL_python-1.2.5-cp27-none-win_amd64.whl