tags:

views:

259

answers:

3

Hey, i have a problem installing PIL on Snow.

I have a clean installation of macports after the upgrade to SL and installed from source the jpeg library following the OS specific installation instructions. Installing PIL with pip goes well but when i try to import the _imaging module i get the following message:

Traceback (most recent call last):
File "<string>", line 1, in <module> ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PIL/_imaging.so, 2): no suitable image found. Did find: /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PIL/_imaging.so: mach-o, but wrong architecture

A: 

I'm not entirely certain (I use a PC myself), but I think that you might find something interesting here

May the force be with you

inspectorG4dget
+1  A: 

PIL on Mac OS X has been a pain point for many of my friends. These instructions seem to often help speedup the enlightenment process:

http://passingcuriosity.com/2009/installing-pil-on-mac-os-x-leopard/

Good luck!

pithyless
+1  A: 

MacPorts already has a PIL port that will do all the work for you!

sudo port install py26-pil

You should first go into the site-packages directory and elsewhere to remove the stuff you installed manually, though. MacPorts will install all the necessary dependent libraries.

Ned Deily
I found you need to make sure these files in particular(pilconvert.py,pildriver.py,pilconvert.py,pilprint.py,pilfont.py ) need to be deleted from /site-packages if they already exist there when installing py26-pil from Macports... The install balked until these were cleared out.
CaseyIT