[Image-SIG] _imaging C module

Doug Easterly playfight at mac.com
Mon Feb 8 05:53:01 CET 2010


I have a MacPowerbook Pro, Intel Core Duo running 10.6.2
and Python 2.6.1 installed 

I have also tried these different instructions for getting PIL to work:

And I have done all manner of variation on the above (installing on top, deleting everything and working from scratch, using macports, etc).

But, each time I try this simple example: 
>>>	from PIL import Image
>>>	mg = Image.open('test.jpg')
>>>	print(mg.size)
>>>	mg.show()

Everything works until I get to mg.show(). Then I get the following traceback:

File "<stdin>", line 1, in <module>
  File "/Library/Python/2.6/site-packages/PIL/Image.py", line 1449, in show
    _showxv(self, title, command)
  File "/Library/Python/2.6/site-packages/PIL/Image.py", line 2082, in _showxv
    file = image._dump(format=format)
  File "/Library/Python/2.6/site-packages/PIL/Image.py", line 476, in _dump
  File "/Library/Python/2.6/site-packages/PIL/ImageFile.py", line 155, in load
  File "/Library/Python/2.6/site-packages/PIL/ImageFile.py", line 223, in load_prepare
    self.im = Image.core.new(self.mode, self.size)
  File "/Library/Python/2.6/site-packages/PIL/Image.py", line 36, in __getattr__
    raise ImportError("The _imaging C module is not installed")

Can anyone please help with this? I've been trying for several days now and just seem to be spinning my wheels.

More info: my build seemed to work ok, but my self test had a failure:

version       1.1.6
platform      darwin 2.6.1 (r261:67515, Jul  7 2009, 23:51:51)
              [GCC 4.2.1 (Apple Inc. build 5646)]
--- TKINTER support ok
--- JPEG support ok
--- ZLIB (PNG/ZIP) support ok
--- FREETYPE2 support ok

Failure in example: _info(Image.open("Images/lena.jpg"))
from line #24 of selftest.testimage
Exception raised:
Traceback (most recent call last):
  File "./doctest.py", line 499, in _run_examples_inner
    exec compile(source, "<string>", "single") in globs
  File "<string>", line 1, in <module>
  File "./selftest.py", line 22, in _info
  File "PIL/ImageFile.py", line 207, in load
    raise IOError(error + " when reading image file")
IOError: decoding error when reading image file
1 items had failures:
   1 of  57 in selftest.testimage
***Test Failed*** 1 failures.
*** 1 tests of 57 failed.


More information about the Image-SIG mailing list