PIL - still ill (newbie)

Cristian Echeverria echeverria at interactiva.cl
Sun Feb 20 18:07:20 EST 2000


Try putting this line at the top of  Image.py (into the PIL directory):

import FixTk

The problem here is that _imaging.dll can't find your tcl/tk installation,
but
with the line above python must find it for you.

Prior to Python 1.5.2 you needed to set some environtment variables
to find tcl/tk and _imaging is still working in that way.

A question for the SecretLab People: Why _imaging.dll is linked
to the tcl/tk DLLs ? That means that PIL did´t work without tcl/tk?

Cristian Echeverria


> Fredrik or anybody,
> I'm still having trouble using PIL.
> I downloaded pil-win32-991101 from pythonware and unzipped it with winzip.
> I unzipped it to c:\program files\python\tools.
> Here's a sample error:
> >>> import Image
> >>> im = Image.open("E:/images/sts93.jpg")
> >>> im.size
> (1038, 768)
> >>> im.thumbnail((128,128))
> Traceback (innermost last):
>   File "<interactive input>", line 0, in ?
>   File "C:\PROGRA~1\PYTHON\PY152\PIL\Image.py", line 724, in thumbnail
>     self.load()
>   File "ImageFile.py", line 125, in load
>     self.load_prepare()
>   File "ImageFile.py", line 175, in load_prepare
>     self.im = Image.core.new(self.mode, self.size)
>   File "C:\PROGRA~1\PYTHON\PY152\PIL\Image.py", line 40, in __getattr__
>     raise ImportError, "The _imaging C module is not installed"
> ImportError: The _imaging C module is not installed
>
> As you can see, it finds Image.py but not the _imaging C module
> (_imaging.dll ?)
>
> I'm not sure if this is part of the problem but I originally placed the
> files in :
> c:\program files\python\py152\
> I had some trouble so I removed them and unzipped in
> c:\program files\python\tools   as I mentioned above.
>
> Why is it still finding Image.py in \python\py152\pil\
> when that directory no longer exists (see traceback above)?
>
> I'm new to python in the windows environment
> so explicit help will be appreciated.
>
> Thanks,
>
> Jim
>
>
>
>





More information about the Python-list mailing list