When installing the PIL module in python, The Unable to find vcvarsall. bat solution is as follows: pilvcvarsall. bat

Source: Internet
Author: User

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.batError.

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.