[Image-SIG] PIL on Mac OS X: _imaging C module not installed

James Eagan eaganj@bazza.com
Wed, 14 May 2003 22:12:29 +0100


Hi folks,

I'm having a little trouble getting PIL to work on my Mac OS X (10.2.6)
system.  I have python2.3a2 installed as a framework (along with Tcl and Tk),
and PIL 1.1.4.  Both python and PIL are built from source.

My PIL is installed in:

dhcp119:/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-pac
kages/PIL $ ls
[...]
ImageDraw.py              PSDraw.py                 _imaging.so*
ImageDraw.pyc             PSDraw.pyc                _imagingft.so*
ImageEnhance.py           PaletteFile.py            _imagingtk.so*

In python, import Image works, but then I get runtime errors of:
    ImportError: The _imaging C module is not installed

Here's the output of a python -v (Note that _imaging.so does indeed exist in
path and that Image.pyc is being loaded from the same directory):

Python 2.3a2 (#1, Apr 24 2003, 16:37:26) 
[GCC 3.1 20020420 (prerelease)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import Image
import Image # precompiled from
/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/PIL/Image.pyc
# /Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-tk/FixTk.pyc
# matches
# /Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-tk/FixTk.py
import FixTk # precompiled from
/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-tk/FixTk.pyc
import ImagePalette # precompiled from
/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/PIL/ImagePalette.pyc
import array # dynamically loaded from
/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload/array.so
import operator # dynamically loaded from
/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload/operator.so
>>> import _imaging
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  ImportError: No module named _imaging



Any assistance that anyone can provide would be great.  Thanks in advance!

James