Skip to content Skip to sidebar Skip to footer

Having "exception Value: The _imaging C Module Is Not Installed" With My Buildout/python/django/pil On Mac Osx Sl?

I'm using Buildout for my Django projects, with FeinCMS. I've got it setup great locally on my Mac OSX Snow Leopard, with no errors coming up at all when I use runserver. But when

Solution 1:

I have gone through the same thing today and found a solution. The problem is that PIL will look for 32-bit libjpeg and Snow Leopard will compile the library as x86_64 by default. This could be fixed by modifying your libjpeg section to look like this:

[libjpeg]recipe = hexagonit.recipe.cmmi
url = http://www.ijg.org/files/jpegsrc.v8.tar.gz
environment =
  CC=gcc -arch i386

You can check which library _imaging.so is using by running:

otool -L path/to/PIL/_imaging.so

It should output the line pointing to libjpeg.8.dylib in your buildout directory.

Edit: On a second thought, running buildout with CC="gcc -arch i386" bin/buildout will also works. If you want to compile a fat binary, remember to use GCC-4.0 and add CPP: CC="gcc-4.0 -arch i386 -arch ppc" CPP="gcc-4.0 -E" bin/buildout.

Post a Comment for "Having "exception Value: The _imaging C Module Is Not Installed" With My Buildout/python/django/pil On Mac Osx Sl?"