When installing the PIL module in python, The Unable to find vcvarsall. bat solution is as follows: pilvcvarsall. bat
Many people may have encountered this error. When setup. py is used to install the python2.7 image processing module PIL, python will find the installed vs2008on the computer by default. If vs2008 is not installed, it will appearUnable to find vcvarsall.bat
Error.
How can this problem be solved? Here are the solutions to this error.
You can set the VS90COMNTOOLS environment variable to guide python to identify a new vs. Then execute setup. py to continue the installation.
If vs2010 is installed, run the following command in cmd:
SET VS90COMNTOOLS=%VS100COMNTOOLS%
If vs2012 is installed, run the following command in cmd:
SET VS90COMNTOOLS=%VS110COMNTOOLS%
If vs2013 is installed, run the following command in cmd:
SET VS90COMNTOOLS=%VS120COMNTOOLS%
If you think VS is too large to install, you can install MinGW.
1. Find the binfolder in the mingwinstallation directory, find mingw32-make.exe, and copy a new file named make.exe.
2. Add the MinGW path to the environment variable path. For example, if I install MinGW in D: \ MinGW \, add D: \ MinGW \ bin to path;
3. Add the distutils. cfg file to the <python installation directory> \ distutils, and enter the following in the file:
[build] compiler=mingw32
Save the file.
Summary
The above is the solution to the Unable to find vcvarsall. bat error when installing the PIL module in python. I hope to help you in your study or work. If you have any questions, please leave a message.