Wednesday, 5 May 2010

Setuptools (easy_install) can't find vcvarsall.bat

So, using easy_install very regularly ended up with the following error being produced:

error: Setup script exited with error: Unable to find vcvarsall.bat

I'd read that I needed to install Visual Studio, so I installed version 10 and set the Path variable. The command prompt could see vcvarsall but not easy_install. grrr!!

The trick seems to be to install mingw from here ( and make sure you select the base tools, g++ compiler and make stuff. Then add `C:\MinGW\bin' to your Path and create a file called disutils.cfg in C:\Python26\Lib\distutils and put the follow in it:


Then exit from your command prompt, open it up again and all should be fine! The solution was found in a comment here:


Jim Thompson said...

Filename should be distutils.cfg

Nathalie said...

Visual Studio Express 10 won't work, you need to install version 9 (aka 2008). I had to because mingw tools doesn't seem to implement all the options.

Matt said...


Bambook said...

This is actually a tremendous web site.

Anonymous said...

Thanks for the info. There is a typo in the file name. It should be distutils.cfg

a "t" missing in your post.