我试图安装Mysql-python on windows x64。Python:如何在Windows 7 x64上安装mysqldb?
我安装蟒蛇64,setuptools的(在叶 LIB检查,安装成功),但我不能安装MySQLdb的。 我试图执行
C:\用户\ Fedcomp \桌面\叶0.4 \ MySQL的 - 蟒蛇-1.2.3>蟒蛇 的setup.py安装
但赶上这
In file included from _mysql.c:34:
D:\servers\xampp_server\xampp\mysql\include/config-win.h:211:1: warning: "finite
" redefined
D:\servers\xampp_server\xampp\mysql\include/config-win.h:164:1: warning: this is
the location of the previous definition
D:\servers\xampp_server\xampp\mysql\include/config-win.h:277:1: warning: "HAVE_S
TDDEF_H" redefined
In file included from D:\Python27\include/Python.h:8,
from pymemcompat.h:10,
from _mysql.c:29:
D:\Python27\include/pyconfig.h:673:1: warning: this is the location of the previ
ous definition
error: command 'gcc' failed with exit status 1
也与MSVC尝试,但赶上这(安装微软的Visual快递)
C:\Users\Fedcomp\Desktop\leaf-0.4\MySQL-python-1.2.3>python setup.py install bui
ld --compiler=msvc
running install
running bdist_egg
running egg_info
writing MySQL_python.egg-info\PKG-INFO
writing top-level names to MySQL_python.egg-info\top_level.txt
writing dependency_links to MySQL_python.egg-info\dependency_links.txt
reading manifest file 'MySQL_python.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'MANIFEST'
warning: no files found matching 'ChangeLog'
warning: no files found matching 'GPL'
writing manifest file 'MySQL_python.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
copying MySQLdb\release.py -> build\lib.win-amd64-2.7\MySQLdb
running build_ext
building '_mysql' extension
error: Unable to find vcvarsall.bat
如何在Windows x64上正确安装mysqldb? (头从原来的MySQL安装,因为在XAMPP服务器,他们不存在)
或者可能有人为Windows编译蟒蛇64或蟒蛇86MySQLdb的?
+1找到了。我会支持使用32位的建议。它确实让生活更轻松。 – 2011-03-12 17:48:15
如果您已经安装了另一个版本,那么我会建议先删除并安装正确的版本。 – 2013-05-20 11:05:20
只是一个小小的评论:我试过第一个链接,它无法连接到我的数据库(版本为Python 2.7)。但第二个链接的驱动程序正常工作。 – dbf 2013-10-19 17:57:28