Having trouble installing PIL in Snow Leopard
Question: I followed these instructions:

<http://proteus-tech.com/blog/cwt/install-pil-in-snow-leopard/>

And everything went as described.

However, at the end, I tried running:

    
    
    python selftest.py
    

to verify that everything is working properly, but I get:

    
    
    *** The _imaging C module is not installed
    

I then run the python interpreter and tried:

    
    
    import _imaging
    

and get this error:

> Traceback (most recent call last): File "", line 1, in 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

This is on my first Mac, so apologize if I'm missing anything obvious, but any
help you could provide would be greatly appreciated.

Thanks!


Answer: The problem happens because jpeglib is not available as part of standard MAC
OS X distribution for Leopard and Snow Leopard.

The solution is as follows: \- compile lib jpeg \- make sure tha
libjpeg62.dylib is available on your DYLD_LIBRARY_PATH (you might like to put
it in places like /usr/local/lib)

Useful instructions are available [here](http://jetfar.com/libjpeg-and-python-
imaging-pil-on-snow-leopard/)

