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