首页 > 技术文章 > [转]Resolving Python error: Unable to find vcvarsall.bat

itxdm 2017-02-09 15:16 原文

Resolving Python error: Unable to find vcvarsall.bat

While installing python package flask-user using pip I was getting the error Unable to find vcvarsall.bat

Resolution:

Download and install Microsoft Visual C++ Compiler for Python 2.7 from https://www.microsoft.com/en-in/download/details.aspx?id=44266
Go to C:\Python27\Lib\distutils and open the file msvc9compiler.py
Go to the def query_vcvarsall(version, arch="x86"):
Add following line of code below vcvarsall = find_vcvarsall(version)

vcvarsall = "C:\Users\NAME\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0" +"/vcvarsall.bat"

Go to command prompt and run pip install flask-user. This time it works fine

注意:vcvarsall = "C:\Users\NAME\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0" +"/vcvarsall.bat"

推荐阅读