Error: Microsoft Visual C + + 9.0 is required (unable to find vcfarsall. Bat). Get it… Solution
When Python installs some modules through pip or source code, these modules contain C/C + + source code, and the installation process will call the local compiler to compile these codes. The error message when I install on Windows platform is “error: Microsoft Visual C + + 9.0 is required (unable to find vcfarsall. Bat). Get it” fromhttp://aka.ms/vcpython27 ”It can be seen that the error is due to not finding the VC version, which corresponds to VS2008. Of course, one solution is to install this version, but I have already installed vs2015, So I need to modify the default configuration
Solutions
Method 1
first, you can determine the version number of vs installed by yourself. You can check the registry. Under HKLM, software, wow6432node, Microsoft and visual studio, as shown in the figure
there will be multiple subkeys of digital card header. Only the one installed will have the corresponding installdir key. You can see that the vs version I installed is 14.0
open the “Python installation directory/lib/distutils/msvc9compiler. Py” file and find_ Vcvarsall function, add
version = the above version number at the beginning of the function, that is, add “version = 14.0”, so that it can be used
def find_vcvarsall(version):
"""Find the vcvarsall.bat file
At first it tries to find the productdir of VS 2008 in the registry. If
that fails it falls back to the VS90COMNTOOLS env var.
"""
version = 14.0 ##added
vsbase = VS_BASE % version
... ...
Method 2:
this method is simpler. Add an item vs90comntools in the environment variable with the value of “vs installation path common 7 tools”, as shown in the figure
Open the command line program again and you can use it
Similar Posts:
- Solving an error: unable to find vcfarsall.bat experience
- The solution of Python extension problem “unable to find vcvarsall. Bat”
- Solving fastdfs in Windows Environment_ Client installation error, error: Microsoft Visual C + + 14.0 is required
- Microsoft Visual C++ 14.0 is required [Two Method to Solve]
- Installation tutorial of visual studio 2017 and visual Assist X
- No compatible servers were found when installing MySQL
- PyCrypto Install error: Unable to find vcvarsall.bat
- DirectX SDK (June 2010) Install Error Code S1023 [How to Solve]
- Installing scrapy in window — solving the problem of error reporting
- [Solved] Windows SDK Fails to Install with Return Code 5100