Microsoft Visual C++ Compiler for Python 2.7 “Unable to find vcvarsall.bat”

from:http://stackoverflow.com/questions/26140192/microsoft-visual-c-compiler-for-python-2-7

 

question:

I downloaded Microsoft Visual C++ Compiler for Python 2.7 , and install it, the full path of vcvarsall.bat is:

But the following code can’t return the path of it:

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:

How can I use the compiler without modify registry or folder name?

best answer:

Update setuptools to 6.0 or greater. In those version setuptools can autodetect Microsoft Visual C++ Compiler for Python 2.7 with the vcvarsall.bat.

Please reference to:

  1. https://pypi.python.org/pypi/setuptools#id4
  2. https://bitbucket.org/pypa/setuptools/issue/258

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注