WIN10pip安装mysql-python报错Cannot open include file: ‘config-win.h’: No such file or director的另一种解决思路

安装mysql-python时报错:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.0.2\include" -Ic:\users\michaelzeng\appdata\local\programs\python\python36\include -Ic:\users\michaelzeng\appdata\local\programs\python\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" /Tc_mysql.c /Fobuild\temp.win-amd64-3.6\Release\_mysql.obj /Zl _mysql.c c:\users\michaelzeng\appdata\local\programs\python\python36\include\pyconfig.h(222): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

参考了这位的博文:http://blog.csdn.net/bijiaoshenqi/article/details/44758055
由于本人使用的是py36,上文方法无法使用。

解决:
最后用pymysql代替:pip install pymysql

连接串这样写:mysql+pymysql://:@/?charset=utf8

上一篇:Android开发四 开发第一个Android应用


下一篇:Intel与合作伙伴CoreOS、Mirantis联手打造“通用资源调度平台”