How to install the Python PIL Library under Windows

Source: Internet
Author: User

Recently in the study of Liao's great Python tutorial, today just learned to "install a third-party module" chapter, the first task is to install the "PIL" library.

What's a PIL library? Liao greatly told us:

Python Imaging Library, which is a very powerful tool for processing images under Python. In general, third-party libraries will be registered in the official Python pypi.python.org website, to install a third-party library, you must first know the name of the library, you can search on the official website or pypi, such as the name of the Python Imaging library is called PiL, so, The command to install the Python Imaging Library is:

pip install PIL

After you have waited patiently for the download and installation, you can use PIL.

Oh! Originally a tool library for image processing , "Pip install PIL" was executed at the command line and the following results were obtained:

Why

Originally Liao Big development environment is unix/linux, and I use is finished evil win one.

After several searches, finally found a glimmer of light.

http://www.lfd.uci.edu/~gohlke/pythonlibs/

Click into the above URL to find a 64-bit unofficial class library Pillow, the site gives the description is:

A replacement for PIL, the Python Image Library, which provides image processing functionality and supports many file form Ats.
Use ' fromPIL import Image' instead of ' import image '.

The original is a PIL replacement, dead horse when live horse medicine, try it!

Downloaded its. whl file after using "Pip Install XXX.WHL" unexpectedly appeared wrong, kneeling!!!

Google Baidu on a random search found that the original still have to first "Pip Install Wheel", still cannot solve.

Finally, after entering "Pip Install pillow" on the command line, it is easy to resolve.

Try referencing pillow on the python command line:

From PIL Import Pillow

Done!!! Successfully installed the PiL class library.

How to install the Python PIL Library under Windows

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.