tags:

views:

560

answers:

5

easy_install pil results in an error:

Searching for pil
Reading http://pypi.python.org/simple/pil/
Reading http://www.pythonware.com/products/pil
Reading http://effbot.org/zone/pil-changes-115.htm
Reading http://effbot.org/downloads/#Imaging
No local packages or download links found for pil
error: Could not find suitable distribution for Requirement.parse(‘pil’)

Any ideas?

--

UPDATE: Hm, asking it to find-links on the Python Ware site seems to be working:

easy_install -f http://www.pythonware.com/products/pil/ Imaging

Got a heap of warnings along the way though. I’ll see how it turns out.

--

UPDATE: I can import it in Python using import Image, but when I tell Django to syncdb I still get the following error:

Error: One or more models did not validate:
core.userprofile: “avatar”: To use ImageFields, you need to install the Python Imaging Library. Get it at http://www.pythonware.com/products/pil/ .

I'm using an ImageField in one of my models.

+3  A: 

Of course PIL is on PyPi! Specifically, it's right here.

Alex Martelli
A: 

import Image

Django tries to import PIL directly:

from PIL import Image

You should check presence of PIL directory in your site-packages

Glader
+1  A: 

easy_install is case-sensitive. The package is under PIL.

Adam Nelson
+1  A: 

workaround is in easy_install PIL egg directory create link to this directory in name "PIL"

A: 

from http://code.djangoproject.com/ticket/6054

It seems that there is something wrong with easy_install which installs PIL in the root namespace, installing from sources fixes this, strange.

Ashok