This article is mostly moot. To build Python C extensions, please see the article "Building Python extensions with Canopy".
The error message "Unable to find vcvarsall.bat" occurs on Windows when attempting to build / install a Python package which contains C code.
The solution is to install MS Visual C++ 2008, the compiler which is used to compile python 2.x itself. You must compile with the same bit length (32 or 64) as the version of Canopy/Python where you wish to use the compiled C code.
The most economical solution, whether on 32-bit or 64-bit Windows, is to use Canopy's 32-bit version, which generally has equivalent functionality to the 64-bit version, unless you are working with large data arrays. At last report, 32-bit Visual C++ Express was available at these MS sites:
http://go.microsoft.com/?linkid=7729279
http://download.microsoft.com/download/E/8/E/E8EEB394-7F42-4963-A2D8-29559B738298/VS2008ExpressWithSP1ENUX1504728.iso
For compatibility with 64-bit Canopy/Python, you can purchase MS Visual Studio 2008 (not the Express version), which is available online from various vendors for about US $200.
(For simple C code, Mingw will sometimes suffice instead of Visual Studio, but there is a danger of library conflicts which may cause difficult-to-trace bugs, so we do not use it in our package builds, nor recommend its use.)
Update: The comments below the article also offer other more recent solutions.
I was able to successfully build a package with C code on my 64-bit Windows 7 machine by following these instructions: http://springflex.blogspot.com/2014/02/how-to-fix-valueerror-when-trying-to.html (which I found on this SO thread: http://stackoverflow.com/questions/13596407/errors-while-building-installing-c-module-for-python-2-7).
Essentially, you have to install Windows SDK, which installs the 64-bit compiler. You then need to copy that another folder (where it's expected to be). A bit annoying, but better than paying $200 Visual Studio 2008.
Thanks, Becky! Updated the article to point to your comment.
The instructions at https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows also work for building 64-bit python extensions with the free SDK. They're slightly different and require using the SDK command shell and setting some environment variables instead of copying the individual .bat files.
It looks like MS recently released a good solution to this problem on Windows 7 and above:
Microsoft Visual C++ Compiler for Python 2.7
We have not yet tested this, but it is targeted at exactly this problem, so I'm optimistic.
Note that admin privileges are required to install this.
You can get the free Windows SDK for Python 2.7 here:
http://www.microsoft.com/en-us/download/details.aspx?id=18950
The SDK is provided as a DVD .iso image; to install it, you'll need software to mount this as a virtual DVD. Windows 8 provides this, but
on Windows 7 you will need something like the following:
http://www.microsoft.com/en-us/download/details.aspx?id=38780
Removed f2py from the article title, to eliminate any possible mis-implication that getting f2py running on Windows would be simple.