Windows installation Python image processing library: PIL module

Source: Internet
Author: User
Tags image processing library

Usually in Linux under the use of Python, today the woman ticket suddenly said let help to make some pictures into a resolution, as a programmer, this duplication of work or to the computer bar.


Needless to say, open cmd to see if there is a PIL (Python Imaging Library) under Windows Python, it is not very strong, Wood has.


So go to the PIL official website to download a Python imaging library 1.1.7 for Python 2.7 (Windows only).

EXE file, direct double click, hint:Python version 2.7 required, which is not found in the registry










Obviously not loaded Python, check the environment variables, no problem.

Then on the Internet Baidu, found that my system is win7 64-bit, and PIL official website provides the download package are 32-bit, you can see here Http://effbot.org/downloads#pil

The location of the 64-bit check registry is: hklm| Hkcu\software\

The location of the 32-bit check registry is: hklm| Hkcu\software\wow6432node\


Then, someone offered an unofficial 64-bit library:

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

Called Pillow, download down, is a. WHL end of the file, this is actually python used a compressed file, the suffix is changed to zip, you can open.

This needs to be installed with PIP.

If you don't have PIP installed on Windows, you can refer to one of my other articles:

http://blog.csdn.net/boycycyzero/article/details/42649283


Pip install PILLOW-2.7.0-CP27-NONE-WIN_AMD64.WHL can be.

Note that there is a

Pillow is a replacement for PIL, the Python Image Library, which provides image processing functionality a ND supports many file formats.
Use ' From PIL import Image ' instead of ' import Image '.

It means to replace ' import image ' with ' from PIL import image '


Then go to the python command line

From PIL import Image

OK, the installation is successful. Usage is the same as PIL.


In addition, there are self-compiled through the source code installed on Windows, you can refer to:

http://www.crifan.com/python_install_pip_error_python_version_2_7_required_which_was_not_found_in_the_registry/



Windows installation Python image processing library: PIL module

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.