Making technology work for you...

Get Your Free Subscription By Email:

Fixing python error: Unable to find vcvarsall.bat

While package managers like PIP for python are easy to use and usually work flawlessly, there can be cases when things fail. While installing the pyAudio package for python in Windows using command pip install pyaudio I encountered error: Unable to find vcvarsall.bat the reason for this error could be many but usually means the library you are trying to install contains some C/C++ code and pip needs to compile them to get a binary. On Windows PIP tries to do that using Microsoft Visual Studio's compiler and when it is unable to find it, throws the error below. Luckily, the solution is very easy as shared ahead.

Unable to find vcvarsall.bat

Solution 1 : The easiest and fastest of all, simply download and install your needed package in a pre-compiled binary form. For python you can grab them from -

Solution 2 : Install a compiler on your computer, the easier option would be to simply install GCC to compile the library. Download the GCC binary from - and it will automatically configure python for you.


Amazing, solution 2 worked, thx!

I tried solution 2 given above and followed the instruction given in github page that opens. The problem is that in the GCC installer after I select MSVCR90.dll and hit next, the installer does not display any versions of python so that GCC can be made the default compiler for distutils even though I have installed Python 2.7.3. Why is that so?
I am using a windows 7 machine. Please help

@akshat: check if you have a 64-bit install of Python. If that's the case, you need to install a 32-bit python, like Anaconda. You won't lose any functionality.

installed 32 bit - confirmed
got an error with vcvarsall.bat - installed vs express - resolved with env var
now - a new error:
_mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\BIN\\cl.exe' failed with exit status 2

Add new comment

This is just one of the many helpful tips we have posted, You can find more stories here,
Do subscribe to updates using your favorite RSS feed reader or using the secure FeedBurner email update form on top of this post.