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)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM