Help understanding how modules are found?

Paul Fredrickson qmoto at
Mon Jan 28 00:27:26 CET 2002

After doing some more research, I discovered that

import _imaging

reveals that the C module is somehow incompatible with 2.2.  I guess I'll
have to recompile it after all.

"Paul Fredrickson" <qmoto at> wrote in message
news:a321k6$v9a$1 at
> I'm upgrading python to 2.2 on windows, and I've had this problem every
> I upgrade. After installing python itself (which works great), I try to
> install the python imaging library, which only installs to c:\py21.  I
> _imaging.pyd and _imagingtk.pyd to the DLLS dir of my python installation,
> and the PIL directory to the base dir, and the PIL.pth file. I don't know
> what that's for, it just contains "PIL"
> When I do an import Image, it works fine.
> im ="filename.gif"), works fine.
> craps out saying the _imaging C module is not installed.
> My question is: where is it looking?  I realize is using the
> python code in the PIL directory, so it hasn't loaded the C module, but
> where else would it look if DLLS isn't the correct place?
> Certainly some of you also run PIL on windows? right?  If someone knows
> the interpreter looks for modules and could help me out, that would be
> great.
> Paul
> (I've never needed to recompile my interpreter and the PIL before, that
> doesn't seem necessary)

More information about the Python-list mailing list