Python的:如何在Windows上安装MySQLdb的7 64位系统? [英] Python: How to install mysqldb on windows 7 x64?

查看:302
本文介绍了Python的:如何在Windows上安装MySQLdb的7 64位系统?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试着安装在MySQL-python的的Windows x64

我安装的蟒蛇64 的setuptools (选中的 lib中,安装成功),但我不能安装的 MySQLdb的。 我试图执行

I installed python x64, setuptools (checked on the leaf lib, successfully installed) but i can't install mysqldb. I trying to execute

C:\用户\ Fedcomp \桌面\叶0.4 \ MySQL的 - 蟒蛇-1.2.3>蟒蛇   的setup.py安装

C:\Users\Fedcomp\Desktop\leaf-0.4\MySQL-python-1.2.3>python setup.py install

但抓住这个

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 EX preSS)

also trying with msvc but catch this (MS Visual express installed)

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 64安装MySQLdb的? (从原来的mysql安装头,因为在XAMPP服务器,他们不存在)

或者可能有人编写的 MySQLdb的作为窗口蟒蛇64 蟒蛇86

Or may someone compile mysqldb for windows python x64 or python x86?

推荐答案

您可以找到二进制安装这里(Python的2.6-3.2),这里(2.7)或者这里(2.6)。请注意,您不必再使用64位Windows上的Python 64。你可以只以及使用32位版本的Python,因为其中有各地的pre-内置第三方的包。

You can find binary installers here (Python 2.6-3.2), here (2.7) or here (2.6). Note that you don't have to use 64bit Python on Windows x64. You can just as well use a 32bit build of Python, for which there are more pre-built 3rd party packages around.

这篇关于Python的:如何在Windows上安装MySQLdb的7 64位系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆