When I tried to compile the python, I always get compile issue as following:
File "C:\Python26\lib\distutils\msvc9compiler.py", line 358, in initialize vc_env = query_vcvarsall(VERSION, plat_spec) File "C:\Python26\lib\distutils\msvc9compiler.py", line 274, in query_vcvarsall raise ValueError(str(list(result.keys()))) ValueError: [u'path']
Python community discussed a lot but no solution: http://bugs.python.org/issue7511
The root cause is because the latest visual studio change the *.bat file a lot especially on 64bit env. The python 2.7 didn't update the path accordingly.
Based on the assumption above, the following solution worked for me.
To install Visual Studio 2008 Express Edition with all required components:1. Install Microsoft Visual Studio 2008 Express Edition. The main Visual Studio 2008 Express installer is available from (the C++ installer name is vcsetup.exe):This package can be installed using the default options.2. Install the Microsoft Windows SDK. The Microsoft Windows SDK is available by searching Microsoft's download site, or by going directly to:http://www.microsoft.com/downloads/details.aspx?FamilyId=F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=enDownload the Windows Server 2008 & .NET 3.5 SDK. Do not install beta or 'Release Candidate' (RC) versions. Also do NOT install "Microsoft Windows SDK for Windows 7 and .NET Framework 4" (version 7.1); if you want to use a 7.x version choose the "Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1".2.1. While installing the SDK, you must select "x64 Compilers and Tools". For example, in the SDK installer above:On the screen "Installation Options"Select "Developer Tools"->"Visual C++ Compilers".This item has the Feature Description "Install the Visual C++ 9.0 Compilers. These compilers allow you to target x86, x64, IA64 processor architectures."3. To verify that you have all installed components, check that the Microsoft SDK contains the "amd64" version of the C/C++ compiler "cl.exe". This is usually installed intoC:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\cl.exe4. copy .../VC/bin/vcvars64.bat to .../VC/bin/vcvarsamd64.bat5. copy .../VC/bin/vcvars64.bat to .../VC/bin/amd64/vcvarsamd64.batNow, get the coffee and wait for the compile result:)