When I tried to use py2exe to create an executable for my GUI program, I received the following error:
Traceback (most recent call last):
File "dopy.py", line 139, in <module>
File "Tix.pyc", line 225, in __init__
_tkinter.TclError: can't find package Tix
My program imports Tix, but py2exe does not package it.
I could not find any solution on the Internet that worked, but the closest was http://www.py2exe.org/index.cgi/TixSetup .
Unfortunately, changing data_files to my Tix path (My Tix8.4.3 instead of the old Tix8.1) does not work either.
My executable program cannot run without Tix, and py2exe does not seem to want to enable it.
In the "dist" folder created by py2exe, I noticed that there is a tcl folder, and inside it is included the "tcl8.5" folder and the "tk8.5" folder, but there is no Tix folder. These folders were identical in my Python / tcl / folder.
Simply copying the tix8.4.3 folder to the dist / tcl / folder will include the DLLs and Tix package files, and now my program works!
source
share