[Image-SIG] "ImportError: The _imaging C module is not installed."

Susi pancakes at snet.net
Thu May 5 03:51:16 CEST 2011

Hi, if you could help that'd be great. I know absolutely nothing about
python; I'm trying to run tutorials but they won't work! I think I installed
it wrong.

For the PIL specific problem if that's all that matters, please scroll down.


I'm trying to run a game tutorial I downloaded and keep getting

pygame.error: File is not a Windows BMP file

I tried putting


in terminal, but it didn't help.

I'm on Snow Leopard. I've googled the crap out of this. As far as I can
tell, the problem is usually that the SDL libraries aren't there. But... in
my /Library/Frameworks, I totally have SDL_image, SDL_mixer, SDL_ttf, and

*I decided to use PIL as a temporary workaround. *
To my code, I added...

def tobmp(img):
    from PIL import Image
    originalimage = Image.open(img)

    convertedimage = originalimage.convert('RGB')
    return convertedimage

Now I get the error, "ImportError: The _imaging C module is not installed."

So I tried like the FAQ said -

$ python -v
>>> import Image

But I got scary things like

>>> import Image
# /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk/FixTk.pyc
has bad mtime


import _imaging

 dlopen("/Library/Python/2.6/site-packages/PIL/_imaging.so", 2);
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
 ImportError: dlopen(/Library/Python/2.6/site-packages/PIL/_imaging.so,
2):      Symbol not found: _jpeg_resync_to_restart

   Referenced from: /Library/Python/2.6/site-packages/PIL/_imaging.so
   Expected in: flat namespace
 in /Library/Python/2.6/site-packages/PIL/_imaging.so

:( If you have any ideas, I'd really appreciate it! Thanks!

Don't sweat the petty things and don't pet the sweaty things.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20110504/17e55927/attachment.html>

More information about the Image-SIG mailing list