It seems that Python is looking explicitly for Visual Studio 2008. I encountered this problem where it couldn't find vcvarsall.bat even though it was on the path.
It turns out that Visual Studio 2010 creates the following environment variable:
SET VS100COMNTOOLS=C:Program FilesMicrosoft Visual Studio 10.0Common7Tools
The fix is to create a variable called VS90COMNTOOLS
and have that point to your Visual Studio 2010 common tools folder, e.g.
SET VS90COMNTOOLS=C:Program FilesMicrosoft Visual Studio 10.0Common7Tools
That fixed it for me and I can now build packages using the Visual Studio 2010 compiler.
You can also set the VS90 environment variable to point to the VS100 environment variable using the command below:
SET VS90COMNTOOLS=%VS100COMNTOOLS%
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…