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:
# code below:
from Tkinter import *
import Image, ImageTk
filename = "images/testimg.jpg"
imgPIL = Image.open(filename)
root = Tk()
imgTK = ImageTk.PhotoImage(imgPIL)
label = Label(root, image=imgTK)
# end of code
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:
2): Library not loaded: /System at rpath/Tcl Referenced from:
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!