美文网首页
python模块MySQLdb安装失败解决方法

python模块MySQLdb安装失败解决方法

作者: LYC_hun | 来源:发表于2017-10-25 12:10 被阅读0次

我们配置好python环境之后想用mysql数据库时候会出现如下问题,在win系统下使用:pip install mysql-python会出现如下错误:

error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat).

Get it from http://aka.ms/vcpython27

解决办法:按上面提示到http://aka.ms/vcpython27下载安装后执行VCForPython27.msi。安装完成可能再次运行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\\Administrator\\AppData\\Local\\Programs\\Common\\

Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit

status 2

解决的方法是在下面链接中下载MySQL-python_jb51net.rar

相关文章

网友评论

      本文标题:python模块MySQLdb安装失败解决方法

      本文链接:https://www.haomeiwen.com/subject/hikqpxtx.html