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.
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 - http://www.lfd.uci.edu/~gohlke/pythonlibs/
Install a compiler on your computer, the easier option would be to simply install GCC to compile the library. Download the GCC binary from - http://www.develer.com/oss/GccWinBinaries and it will automatically configure python for you.