Problem displaying jpgs in Tkinter via PIL
Armin
amphioxus at yahoo.com
Tue May 11 12:57:01 EDT 2010
Never mind, I gave up on Tkinter and have switched to wxPython now.
Getting jpg images to display in a wx frame worked like a charm... (As
I said, I'm very new to Python, so I didn't really know what my options
for GUI programming were.)
It seems like the ImageTk module on the Enthought distribution on my
Mac is broken, but I can't figure out how to fix that. (I wiped my
python installations and did a re-install, all to no avail.) As long as
I don't need Tkinter for the GUI I'm envisioning, I don't really care
however.
On 2010-05-10 14:01:10 -0700, Armin said:
> I'm new to Python and have been playing around with it using the
> Enthought Python distribution for Mac OS X 10.6.3 (EPD academic
> license, version 6.1 with python 2.6.4).
>
> It's been great learning the basics, but I've started running into
> problems when I'm trying to use the PIL library with Tkinter. All I'm
> trying to do is display a JPG as a Tkinter label:
>
> It all works fine when I'm just using GIF images through Tkinter's
> photoimage object, but as soon as I'm trying to convert an image
> through ImageTk, I get the following error:
>
> ImportError:
> dlopen(/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/PIL/_imagingtk.so,
> 2): Library not loaded: /System at rpath/Tcl Referenced from:
> /Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/PIL/_imagingtk.so
> Reason: image not found
>
> I have no idea what that means, but I've always assumed the EPD
> includes all the stuff that's needed to make Tkinter work with PIL.
> Any advice would be greatly appreciated. Thanks!
More information about the Python-list
mailing list