Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#392 closed defect (cant-reproduce)

PIL setup fails

Reported by: Blaise Alleyne Owned by:
Priority: major Milestone:
Component: component1 Keywords: PIL
Cc: Parent Tickets:

Description

I've had this problem since setting up GMG in December, just confirmed after an upgrade to 0.2.1: when I run ./bin/python setup.py develop --upgrade the process fails, and I get PIL errors when I attempt to run GMG and visit any image page.

Here is the PIL output from ./bin/python setup.py develop --upgrade:

Processing PIL-1.1.7.tar.gz
Running PIL-1.1.7/setup.py -q bdist_egg --dist-dir /tmp/easy_install-r9jp0l/PIL-1.1.7/egg-dist-tmp-jy3iuI
WARNING: '' not a valid package name; please use only.-separated package names in setup.py
_imaging.c: In function ‘init_imaging’:
_imaging.c:3253:15: warning: variable ‘d’ set but not used [-Wunused-but-set-variable]
--------------------------------------------------------------------
PIL 1.1.7 SETUP SUMMARY
--------------------------------------------------------------------
version       1.1.7
platform      linux2 2.7.2+ (default, Oct  4 2011, 20:03:08)
              [GCC 4.6.1]
--------------------------------------------------------------------
*** TKINTER support not available
*** JPEG support not available
*** ZLIB (PNG/ZIP) support not available
*** FREETYPE2 support not available
*** LITTLECMS support not available
--------------------------------------------------------------------
To add a missing option, make sure you have the required
library, and set the corresponding ROOT variable in the
setup.py script.

To check the build, run the selftest.py script.
zip_safe flag not set; analyzing archive contents...
Image: module references __file__
Adding PIL 1.1.7 to easy-install.pth file
Installing pilfont.py script to /home/balleyne/bin/mediagoblin/bin
Installing pilconvert.py script to /home/balleyne/bin/mediagoblin/bin
Installing pildriver.py script to /home/balleyne/bin/mediagoblin/bin
Installing pilfile.py script to /home/balleyne/bin/mediagoblin/bin
Installing pilprint.py script to /home/balleyne/bin/mediagoblin/bin

Installed /home/balleyne/bin/mediagoblin/lib/python2.7/site-packages/PIL-1.1.7-py2.7-linux-i686.egg

I've been using a workaround. I have the python-imaging package installed in Ubuntu, so I just run rm -rf lib/python2.7/site-packages/PIL-1.1.7-py2.7-linux-i686.egg/ and restart GMG, which I presume causes it to use the version of PIL I have installed system-wide, and everything works fine after that, but I'm not sure how to fix the setup.py PIL virtualenv install...

Change History (3)

comment:1 by joar, 13 years ago

PIL requires the header packages for zlib, libpng and libjpeg to be build with support for those formats. zlib is IIRC only needed if you want PNG support. If you'd like ASCII support too, I think you have to install the libfreetype header package too.

Those header packages are

  • zlib1g-dev
  • libpng12-dev
  • libjpeg8-dev
  • libfreetype6-dev

on my Debian wheezy setup.

Installing the package from your package manager will solve this issue, and it's easier than keeping the header packages around for everytime you'll upgrade PIL.

comment:2 by Christopher Allan Webber, 13 years ago

Resolution: worksforme
Status: newclosed

Joar's comment explains what needs to be done.. I don't believe this is a bug. Hop onto IRC if you still run into trouble!

comment:3 by Will Kahn-Greene, 13 years ago

I was reading about a PIL fork called "pillow" that is like PIL but with better packaging.

http://pypi.python.org/pypi/Pillow

It might be interesting to look into that more. Maybe depending on pillow is a better experience for most people than PIL.

Note: See TracTickets for help on using tickets.