Windows下python 安装Mysqldb模块
CMD执行
pip install mysql-python
报错如下:
1.如果报类似 Microsoft Visual C++ 9.0 is required < Unable to find vcvarsall.bat 这样的错误,
需要安装下面这个,自己选32还是64位
MySQL-python-1.2.3.win32-py2.7.exe (1,023.1 KiB)
MySQL-python-1.2.3.win-amd64-py2.7.exe
2.如果还有这个错误 : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory
需要安装 mysql-connector-c-6.0.2
版本自己选:https://dev.mysql.com/downloads/connector/c/6.0.html#downloads
安装后,可以再试试
pip install mysql-python