PIL(Python Imaging Library) is an image processing library for python.
In this post I will show you how to install PIL.
- Python should be already installed on the machine. To make sure, just type ‘python’ in terminal and see if its already there.
- Xcode should already be installed
I installed PIL using pip.
If you dont have pip, do the following. Open the terminal and type the following:
curl -O http://pypi.python.org/packages/source/p/pip/pip-0.7.2.tar.gz tar xzf pip-0.7.2.tar.gz cd pip-0.7.2 sudo /usr/bin/python setup.py install
This will install pip. Once pip is installed, you can install PIL by following steps.
First make sure you have lib jpeg install for JPEG handling. To do that,
curl -O http://www.ijg.org/files/jpegsrc.v8c.tar.gz tar zxvf jpegsrc.v8c.tar.gz cd jpeg-8c/ ./configure make sudo make install
Then install PIL using pip
sudo pip install PIL