[转]Resolving Python error: Unable to find vcvarsall.bat

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:Python27Libdistutils 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:UsersNAMEAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0" +"/vcvarsall.bat"

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

注意:vcvarsall = "C:UsersNAMEAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0" +"/vcvarsall.bat"

原文地址:https://www.cnblogs.com/itxdm/p/6382273.html