easy_install PIL – Not so Easy
For some reason, the Python Imaging Library doesn’t seem to easy_install from pypi. Fortunately, Martin Geber found the solution.
I get this when I try to easy_install PIL:
$ easy_install PIL
Searching for PIL
Reading http://cheeseshop.python.org/pypi/PIL/
Reading http://www.pythonware.com/products/pil
Reading http://effbot.org/downloads/#Imaging
Reading http://cheeseshop.python.org/pypi/PIL/1.1.6
No local packages or download links found for PIL
error: Could not find suitable distribution for Requirement.parse('PIL')
Try this instead:
$ easy_install --find-links http://www.pythonware.com/products/pil/ Imaging
Thanks, Martin!

Have you tried that in a buildout?
jjmojojjmojo said this on June 9, 2009 at 12:15 pm |
I have, but sometimes need it in my virtualenv.
Liz said this on June 9, 2009 at 12:46 pm |
Oh, and just to make imports work in the case where you need something like “from PIL.JpegImagePlugin import MARKER” you can create a symbolic link in site-packages from the Imaging*egg dir to PIL (should work if you have PIL installed globally or in a virtualenv site-packages directory).
Sean Upton said this on June 9, 2009 at 3:53 pm |
I just do: easy_install http://dist.repoze.org/PIL-1.1.6.tar.gz
Adding that URL to find-links in a buildout works too.
Matthew Wilkes said this on June 9, 2009 at 5:31 pm |
[...] Now I’m off to fix this, which I’ve done too many times to count: [...]
Conquering Symbol not found: _PQbackendPID | BenKreeger.com said this on November 22, 2009 at 4:49 pm |
sudo easy_install –find-links http://www.pythonware.com/products/pil/ Imaging
Searching for Imaging
Reading http://www.pythonware.com/products/pil/
Best match: Imaging 1.1.7
Downloading http://effbot.org/downloads/Imaging-1.1.7.tar.gz
Processing Imaging-1.1.7.tar.gz
Running Imaging-1.1.7/setup.py -q bdist_egg –dist-dir /tmp/easy_install-6etRCx/Imaging-1.1.7/egg-dist-tmp-XcwALp
WARNING: ” not a valid package name; please use only.-separated package names in setup.py
— using frameworks at /System/Library/Frameworks
unable to execute gcc-4.0: No such file or directory
error: Setup script exited with error: command ‘gcc-4.0′ failed with exit status 1
OSX 10.6.3, Python 2.6.5
Any ideas?
Sean said this on April 13, 2010 at 1:10 pm |
You’re missing gcc. Do you have the dev cd that came with your mac? gcc should be on there.
Liz said this on April 13, 2010 at 1:17 pm |
Better late than never. If you get the error “WARNING: ” not a valid package name”, ensure that you have the Python library/headers available (i.e., Python.h). If you’re using Ubuntu/Debian, you can run: apt-get install python-dev. Hope that helps!
Stefan said this on September 27, 2011 at 11:43 am |