The problem with installing PIL using virtualenv or buildout.

Posted by Alexander Artemenko on Stack Overflow See other posts from Stack Overflow or by Alexander Artemenko
Published on 2010-03-21T00:19:07Z Indexed on 2010/03/21 0:21 UTC
Read the original article Hit count: 1020

Filed under:
|
|
|
|

When I install PIL using easy_install or buildout it installs in such way, that I must do 'import Image', not 'from PIL import Image'.

However, if I do "apt-get install python-imaging" or use "pip -E test_pil install PIL", all work fine.

Here are examples of how I trying to install PIL using virtualenv:

# virtualenv --no-site-packages test_pil
# test_pil/bin/easy_install PIL
# test_pil/bin/python
Python 2.5.1 (r251:54863, Feb  6 2009, 19:02:12) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import PIL
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named PIL

I see, that easy_install pack PIL into the Egg, and PIP does not. Same thing with buildbot, it uses eggs.

How could I install PIL properly, using easy_install or buildout?

© Stack Overflow or respective owner

Related posts about python

Related posts about pil