The _imaging C module is not installed

Posted by: scoopseven 12 years, 9 months ago

While trying to use PIL on a Arch linux box (python 2.6.7) I kept getting the dreaded "The _imaging C module is not installed" error message.  I tried installing libjpeg using pacman and from source. I tried installing freetype2 using pacman and from source. After each of these attempts, I reinstalled PIL with the --update option and went through the...

python
>> import Image
>> import _imaging

to test. None of this helped.  My libjpeg.so file was in /usr/local/lib, so I added that to sys.path; still didn't work.  I finally resolved the problem with ldconfig.

ldconfig /usr/local/lib/

Salvation! Not sure why this worked and adding /usr/local/lib to sys.path didn't, but it got resolved, so I'm OK with it.

UPDATE: Last time this happened to us, we needed to:

restart node <- maybe we don't need to do this, we were in panic mode.
run ldconfig (ldconfig) <- without any arguments
test import (python > import Image > import _imaging)
stop apache (/etc/rc.d/httpd stop)
restart memcached (/etc/rc.d/memcached restart)
start apache (/etc/rc.d/httpd start)
pray (hands together)

Current rating: 5


Recent Tweets

Recent Posts

Archive

2013
2012
2011
2010
2009
2008
2007
2006

Categories

Authors

Feeds

RSS / Atom