VCForPython27.msi安装后, 还显示error: Unable to find vcvarsall.bat

C:\Users\zpc\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC

增加环境变量:

SET VCPYTHONPATH=C:\Users\zpc\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0

254行增加以下内容:

if not productdir or not os.path.isdir(productdir):
        toolskey = "VCPYTHONPATH"
        toolsdir = os.environ.get(toolskey, None)

        if toolsdir and os.path.isdir(toolsdir):
            productdir = os.path.abspath(toolsdir)
            if not os.path.isdir(productdir):
                log.debug("%s is not a valid directory" % productdir)
                return None
        else:
            log.debug("Env var %s is not set or invalid" % toolskey)
posted @ 2015-06-05 08:18  aprial  阅读(8608)  评论(2编辑  收藏  举报