[Image-SIG] Need help with PIL image & imagetk

Fredrik Lundh fredrik at pythonware.com
Thu Jul 27 09:36:25 CEST 2006

Read H O L (Comp) wrote:

> Im trying to do something relatively simple, loading up an image file, 
> resize it, then display it on a canvas. However, im getting some strange 
> problems, namely (output from console):
> File "Geomap_0.0.2.py", line 57, in drawInitial
> bgimg = ImageTk.PhotoImage(img)
> File "/usr/local/lib/python2.4/site-packages/PIL/ImageTk.py", line 116, 
> in __init__
> self.paste(image)
> File "/usr/local/lib/python2.4/site-packages/PIL/ImageTk.py", line 181, 
> in paste
> import _imagingtk
> ImportError: /usr/local/lib/python2.4/site-packages/PIL/_imagingtk.so: 
> undefined symbol: Tk_PhotoPutBlock_NoComposite

this looks as a version mismatch: you get different (older) libraries at 
runtime compared to the ones you used when building PIL.

if you're using a contemporary Linux version, try using the official 
builds for both Tk and PIL, if possible.

(look for tk and python-imaging or pil in the official package repository)


More information about the Image-SIG mailing list