Python issue:Unable to find vcvarsall.bat

Question:

Possible Duplicate:
error: Unable to find vcvarsall.bat

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-infoPKG-INFO
writing top-level names to MySQL_python.egg-infotop_level.txt
writing dependency_links to MySQL_python.egg-infodependency_links.txt
reading manifest file 'MySQL_python.egg-infoSOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'MySQL_python.egg-infoSOURCES.txt'
installing library code to buildbdist.win32egg
running install_lib
running build_py
copying MySQLdbrelease.py -> buildlib.win32-2.6MySQLdb
running build_ext
building '_mysql' extension
error: Unable to find vcvarsall.bat

I’m using Python 2.6 on Windows XP.

Asked By: Switch

||

Answers:

I don’t know whether it helps you, but check out this forum thread, it could be a version issue.

There are important differences between the several versions of VC++.
The most important discrepancy is the runtime library version. Each
version of Visual Studio uses its own msvcrt dll. The command line
options, deprecated functions, project file formats and other things are
also slightly different.

Answered By: Pekka

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

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

Answered By: YOU

I realize this question is over a year old. However, YOU’s executables don’t work for Win64 machines. I’ve found Christopher Gohlke’s Python libraries extremely helpful: http://www.lfd.uci.edu/~gohlke/pythonlibs/.

For MySQL-python on Win64 and Py27: http://www.lfd.uci.edu/~gohlke/pythonlibs/49ej5jcn/MySQL-python-1.2.3.win-amd64-py2.7.exe

Answered By: Logan Bibby

Installation of mysql-python is confusing. It wasted my hours to deal with errors. Finally, I encounter here. It refers a compiled file. Try it.

Answered By: tinylamb

The easiest approach for me was to go here http://sourceforge.net/projects/mysql-python/ and get the executable.

This made it easy.

Answered By: nu everest
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.