Python问题:无法找到vcvarsall.bat [英] Python issue:Unable to find vcvarsall.bat

查看:136
本文介绍了Python问题:无法找到vcvarsall.bat的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
错误:无法找到vcvarsall.bat

Possible Duplicate:
error: Unable to find vcvarsall.bat

我正在尝试为python安装MySql接口,但出现错误(如下所述).我知道解决方案:安装Microsoft Visual C ++.除了安装Microsoft Visual C ++之外,还有其他解决方案吗?我的意思是这真的伤害了我.我为什么要安装Microsoft Visual C ++仅仅是因为构建此单个程序包,从开发人员的角度来看,这是一种无用且浪费时间的方法.这个问题有其他替代解决方案吗?

I'm trying to install MySql interface for python, but I got an error (mentioned below). And I know the solution: install Microsoft Visual C++. Is there any alternative solution apart from installing Microsoft Visual C++? I mean this has really hurt me; why should I install Microsoft Visual C++ just because to build this single package it's a useless and time-wasting approach from the developer's perspective. Is there any alternative solution for this issue?

MySQL-python-1.2.3c1>setup.py install
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'
writing manifest file 'MySQL_python.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
copying MySQLdb\release.py -> build\lib.win32-2.6\MySQLdb
running build_ext
building '_mysql' extension
error: Unable to find vcvarsall.bat

我正在Windows XP上使用Python 2.6.

I'm using Python 2.6 on Windows XP.

推荐答案

您将需要MSVC编译器或mingw32进行编译,并且还需要MySQL标头文件.

You will need MSVC compiler or mingw32 to compile that, and also need MySQL Header files.

我为Python2.6的MySQL1.2.3c1编译了一次,您可以找到它

I've compiled once for MySQL1.2.3c1 for Python2.6, you could find it here.

这篇关于Python问题:无法找到vcvarsall.bat的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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