PIL, the Python imaging library, is a prerequisite for the image processing recipes in this chapter.
Let's see how to install PIL.
sudo apt-get install python-imaging
Install with either of the following commands:
easy_install PIL sudo pip install PIL