From the error:
File "C:\Python27\Lib\distutils\msvc9compiler.py", line 295, in q
uery_vcvarsall
raise ValueError(str(list(result.keys())))
ValueError: [u'path']
distutils looks for a file called vcvarsall.bat. It runs it and gets the include and lib directories that the batch file sets up. The batch file sets up the environment based on what platform you supply to it.
vcvarsall.bat should be in a directory like: C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC
Create following directories:
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\vcvarsamd64.bat
in vcvarsamd64.bat
call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /Release
All these above sets up windows tool chain to work with disutils. While you may have 64 bit python, most packages on pypi comes with 32 bit precompiled binaries. disutils needs to use your compiler tool chain for building 64 bit extensions. This is where all this come into picture.
Please look at :
What vcvarsamd64.bat and other batchfile does is setup up paths for libs, tools etc which can be used by disutils.
[Edit: setenv.cmd not found in v6]
http://serverfault.com/questions/114998/vista-cmd-shell-thinks-its-windows-server-2008-debug