windows 安装 mysqldb-python 问题

系统环境: win7, python2.6,vs2010

首先从官网下载 mysql 5.6, 安装dev 配置就可以了

下载 mysqldb-python source

执行 python setup.py build 出现错误 unable to find vcvarsall.bat

这个曾碰到过, 使用 http://www.cnblogs.com/shadow21/p/3436586.html 的方法

出现 error: command 'gcc' failed with exit status 1

网上查找原因: 有人说是mysql-devel, 有的是python-dev 反正一个都找不到在哪里安装

还是采用用vs编译吧, 因为电脑上装了vs2010, 直接将vs2008的目录指向这里就可以了, 添加环境变量

 

再执行 python setup.py build, 出现 

fatal error C1083: 无法打开文件:'confgi_win.h': No such file or direcotry

解决办法: http://stackoverflow.com/questions/1972259/mysql-python-install-problem-using-virtualenv-windows-pip

但是无赖mysql 5.6没有"C include Files / Lib Files", 去官方下载吧

一番设置之后, 又出现 mt.exe failed with exit status 31

参照: http://stackoverflow.com/questions/12418735/pip-fails-to-install-pil-or-pillow-with-mt-exe-error

http://bugs.python.org/issue4431

 

一波几则,终于安装上了

 其他参考:

http://cyfloel0516.sinaapp.com/?p=193

http://fuyun.org/2009/12/install-mysql-for-python-on-windows/

posted on 2013-11-23 10:33  影语者  阅读(315)  评论(0编辑  收藏  举报

导航