Help understanding how modules are found?

Paul Fredrickson qmoto at dsl-only.net
Sun Jan 27 17:27:43 EST 2002


I'm upgrading python to 2.2 on windows, and I've had this problem every time
I upgrade. After installing python itself (which works great), I try to
install the python imaging library, which only installs to c:\py21.  I move
_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 = Image.open("filename.gif"), works fine.
im.show() craps out saying the _imaging C module is not installed.

My question is: where is it looking?  I realize Image.open 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 how
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