PIL (Python Imaging Library) for Python 2.x
PIL (aka the Python Imaging Library) is used in many of the Carleton College Intro CS courses. NOTE: PIL is NOT available for Python 3. This page contains installation instructions for Python 2.x:
WINDOWS XP and Vista and 7:
- The latest downloads of PIL for windows can be found at http://www.pythonware.com/products/pil/.
- Download the current release: http://effbot.org/downloads/PIL-1.1.7.win32-py2.7.exe
- Double click on the downloaded executable. And that will install PIL.
MAC:
- In order to install PIL, you must have Xcode, a developer toolset, installed on your machine. These files can be found on the installation CD's provided by Apple when you purchased your MAC.
- These files can also be found online: http://developer.apple.com/technologies/xcode.html
- You MUST be a registered Apple Developer to download software. Registration is free and can be done here: http://developer.apple.com/programs/register/
- PIL has not been packaged into a dmg, so we will need to use the Terminal for this, to open Terminal go to Applications>Utilities and find terminal.
- Now if you have installed wget in the past you can type at the command prompt:
-
wget http://www.ijg.org/files/jpegsrc.v8c.tar.gz
- If you haven't installed wget, just open a web browser and navigate to the following address and the file will automatically download.
- At the command line type the following:
-
-
tar zxvf jpegsrc.v8c.tar.gz
cd jpeg-8/
./configure
make
sudo make install -
- Note ./configure, make, and sudo make install may take some time
-
We've had the best luck installing PIL using a tool called pip, so first, you'll need to install pip.
- At the command line, type the following:
curl -O http://python-distribute.org/distribute_setup.pysudo python2.7 distribute_setup.pycurl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.pysudo python2.7 get-pip.py
- Finally, type:
-
- sudo pip-2.7 install pil
-
- This will take a while.
If you have any questions about installing PIL for Windows, Mac, or any other operating system, please contact Michael Tie (mtie@carleton.edu x4067)
If you having trouble with a laptop, you can even bring your computer to Mike Tie (cmc 305) for help.







