PIL, the Python imaging library, is a prerequisite for the image processing recipes in this chapter. If you prefer, you can install Pillow, which is a fork of PIL. Some people prefer the Pillow API; however, we are not going to cover its installation in this book.
Let's see how to install PIL:
Installing PIL on Windows: Install PIL using the Windows executable from the PIL website at http://www.pythonware.com/products/pil/.
Installing on Debian or Ubuntu: On Debian or Ubuntu, install PIL using the following command:
$ sudo apt-get install python-imaging
Installing with
easy_install
orpip
: At the time of writing this book, it appears that the package managers of Red Hat, Fedora, and CentOS do not have direct support for PIL. Therefore, follow this step if you are using one of these Linux distributions.Install with either of the following commands:
$ easy_install PIL $ sudo pip install PIL
Instructions for Pillow (a fork of PIL) can be found at http...