I downloaded Microsoft Visual C++ Compiler for Python 2.7 , and install it, the full path of vcvarsall.bat
is:
C:\Users\UserName\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\vcvarsall.bat
But the following code can't return the path of it:
from distutils import msvc9compiler
msvc9compiler.find_vcvarsall(9.0)
The installer doesn't write the install information to the registry, and from the source code of find_vcvarsall()
, it seems that it can't find the vcvarsall.bat
file from VS90COMNTOOLS
setting, because it requires that the name of the folder that contains vcvarsall.bat
is VC
:
productdir = os.path.join(toolsdir, os.pardir, os.pardir, "VC")
How can I use the compiler without modify registry or folder name?