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-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
I’m using Python 2.6 on Windows XP.
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.
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
You can also try this:
mysql-python is confusing. It wasted my hours to deal with errors. Finally, I encounter here. It refers a compiled file. Try it.
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.
The easiest approach for me was to go here http://sourceforge.net/projects/mysql-python/ and get the executable.
This made it easy.