[Image-SIG] Installation woe: _imaging module missing after "successful" install from source

Amos Newcombe anewc2 at gmail.com
Wed Jul 9 21:03:43 CEST 2008

I am having trouble installing PIL 1.1.6 on a new MacBook Pro (with
10.5.3). I got the source code version and ran "python setup.py
build_ext -i" and it seemed to go well, passing the self test. But
when I try to run my program, as soon as it calls Image.copy() I get
this trace:

  File "/Library/Python/2.5/site-packages/PIL/Image.py", line 718, in copy
  File "/Library/Python/2.5/site-packages/PIL/ImageFile.py", line 155, in load
  File "/Library/Python/2.5/site-packages/PIL/ImageFile.py", line 223,
in load_prepare
    self.im = Image.core.new(self.mode, self.size)
  File "/Library/Python/2.5/site-packages/PIL/Image.py", line 36, in __getattr__
    raise ImportError("The _imaging C module is not installed")
ImportError: The _imaging C module is not installed

And all this happens because at a crucial point in Image.py (line 58),
an import statement fails to find the _imaging module.

I thought setup.py was supposed to take care of that.

Then I find the binary package
from pythonmac.org, and I try that, only to fail with this message:

"You cannot install PIL 1.1.6 on this volume. PIL requires System
Python 2.5 to install."

I don't know how "System Python 2.5" differs from the Python 2.5 that
just came on this new MacBook Pro, the one that starts out

Python 2.5.1 (r251:54863, Feb  4 2008, 21:48:13)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

But the end result is, I am striking out here installing PIL. What can I do?

More information about the Image-SIG mailing list