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