Many people may have encountered this error when using setup.py to install the python2.7 image processing module PIL, Python will look for the vs2008 installed on the computer by default. If you do not have VS2008 installed, it will appear
Unable to find vcvarsall.bat
Error.
So how to solve this mistake? Here is the solution to this error.
You can boot Python by setting the VS90COMNTOOLS environment variable to identify a new vs. then execute setup.py to continue with the installation.
If you installed the VS2010, execute it in cmd:
SET vs90comntools=%vs100comntools%
If vs2012 is installed, execute in CMD:
SET vs90comntools=%vs110comntools%
If you installed the vs2013, execute it in cmd:
SET vs90comntools=%vs120comntools%
If you think that the VS is too big, do not want to install, also can install MinGW to solve.
1, find the Bin folder in the MinGW installation directory, find Mingw32-make.exe, copy the name of the Make.exe
2, add the path of the MinGW to the environment variable path, for example, I put the MinGW installed into the D:\MinGW\, the D:\MinGW\bin added to the path;
3, in the <python installation directory >\distutils add File Distutils.cfg, in the file input:
[Build] Compiler=mingw32
Save the file.
Summarize
The above is the Python installation PiL module encountered unable to find Vcvarsall.bat error solution, I hope that everyone's study or work to bring certain help, if there is doubt you can message exchange.