Home > Article > Backend Development > Solution to Unable to find vcvarsall.bat error when installing PIL module in python
Many people may have encountered this error. When using setup.py to install the python2.7 image processing module PIL, python will by default look for vs2008 installed on the computer. If you do not install vs2008, Unable will appear to find vcvarsall.bat
Error.
So how to solve this error? Here's how to fix this error.
You can set the VS90COMNTOOLS environment variable to guide python to recognize a new vs. and then execute setup.py to continue the installation.
If you have installed vs2010, execute in cmd:
SET VS90COMNTOOLS=%VS100COMNTOOLS%
If you have installed vs2012, Execute in cmd:
SET VS90COMNTOOLS=%VS110COMNTOOLS%
If you installed vs2013, execute in cmd:
SET VS90COMNTOOLS=%VS120COMNTOOLS%
If you think VS is too big and don’t want to install it, you can also install MinGW to solve it.
1. Find the bin folder in the MinGW installation directory, find mingw32-make.exe, make a copy and rename it make.exe
2 . Add the path of MinGW to the environment variable path. For example, if I install MinGW in D:\MinGW\, then add D:\MinGW\bin to the path;
3. 3319a8d7fa70563fa5ec34c081406954\distutilsAdd the file distutils.cfg, enter in the file:
[build] compiler=mingw32
and save the file.
Summary
The above is the solution to the Unable to find vcvarsall.bat error encountered when python installs the PIL module. I hope it can It will be helpful to everyone’s study or work. If you have any questions, you can leave a message to communicate.
For more related articles on the solution to the Unable to find vcvarsall.bat error when installing the PIL module in python, please pay attention to the PHP Chinese website!