Transferred from: Http://www.douban.com/note/361230278/?type=like
Reference: http://my.oschina.net/zhangdapeng89/blog/54407 Comment
-Python 2.7 will search for Visual Studio 2008.
If you do not have this version on your computer, for example, only:
1.Visual Studio 2010, executed inside CMD:
SET vs90comntools=%vs100comntools%
2. Visual Studio 2012:
SET vs90comntools=%vs110comntools%
And then it's going to work.
-If VS2010 or VS2012 is installed, you can use the following method to solve the problem:
If you have Visual Studio installed, execute >
SET vs90comntools=%vs100comntools%
or with Visual Studio installed >
SET vs90comntools=%vs110comntools%
Python 2.7 looks for VS2008 compiled at setup.
For Windows Installations:while running setup.py
Installations Python 2.7 Searches for an installed Visual Studio 2008.
You can trick Python-newer Visual Studio by setting correct path
In Vs90comntools environment variable before calling setup.py.
Original link: http://i.xlanlab.com/2793.html
Go: python-Resolve "Unable to find Vcvarsall.bat" error