I’m trying to convert a GUI program that uses .png images into an .exe using py2exe. It uses PIL to display these images. However, I’m having trouble with it converting. For some reason the .exe it makes wont run. Any ideas?
Edit
Error:
Traceback (most recent call last):
File "GUI1.2.8.py", line 454, in <module>
File "GUI1.2.8.py", line 13, in __init__
File "Tkinter.pyc", line 1643, in __init__
_tkinter.TclError: Can't find a usable init.tcl in the following directories:
{C:/Users/rectangletangle/lib/tcl8.5} {C:/Users/rectangletangle/lib/tcl8.5} C:/Users/lib/tcl8.5 {C:/Users/rectangletangle/library} C:/Users/library C:/Users/tcl8.5.8/library C:/tcl8.5.8/library
This probably means that Tcl wasn't installed properly.
The error seems to be completely unrelated (If I do anything wrong with py2exe, this is the error I usually get). Everything, work’s until I import and use PIL. Also, I included PIL in my setup file.
Edit 2
This is a snippet showing how I implement the image.
self.image = ImageTk.PhotoImage(Image.open("image.png"))
self.imageLabel = Tkinter.Label(self, image=self.image)
self.imageLabel.grid(column=0, columnspan=4, row=0)
how do you display the image?
maybe PIL uses tcl/tk to img.show() and that’s why you should include tcl in your py2exe setup script.