I'm having problems using PyInstaller with a particular program. The
program in question was written using Python 2.4 with Tk and Tix. At
the beginning of my program, I have the following imports:
from Tkinter import *
from Tix import Tk, ComboBox
import tkFileDialog, tkMessageBox
import os, sys, csv
from math import *
After compilation and subsequent running of the program, I will
receive the following error:
C:\Program Files\Pump Head Loss Calculator>plumbing.exe
Extracting binaries
C:\Program Files\Pump Head Loss Calculator\python24.dll
Manipulating evironment
PYTHONPATH=C:/Program Files/Pump Head Loss Calculator
importing modules from CArchive
iu
archive
Installing import hooks
out1.pyz
Running scripts
Traceback (most recent call last):
File "<string>", line 495, in ?
File "<string>", line 328, in makeWindow
File "C:\Python24\buildplumbing\out1.pyz/Tix", line 210, in __init__
_tkinter.TclError: couldn't load library "tix8184.dll": this library
or a dependent library could not be found
in library path
RC: -1 from plumbing
OK.
I am getting a traceback error that tix8184.dll could not be found
when the program is run. However if I edit my PATH and add 'C:
\Python24\DLLs\' the executable will run just fine. It should be
noted that I have Python 2.4 installed on this PC. If I install this
on any PC without Python, I have no options to make this work since
it's dependent on a pre-installed python. The other programs that I
have written that do not use the Tix package run just fine.
Is there a known bug with the Tix package with PyInstaller or did I
not do something right during the build process?
Thanks,
Shane
I figured out the problem. I had to copy tix8184.dll from C:
\Python24\DLLs to my dist directory as PyInstaller wasn't doing it for
me. Once I did this the program executed just fine.
Shane
> Just as a follow-up:
>
> I figured out the problem. I had to copy tix8184.dll from C:
> \Python24\DLLs to my dist directory as PyInstaller wasn't doing it for
> me. Once I did this the program executed just fine.
It looks like a hidden import, since it's executed as a tk.eval(). Basically,
PyInstaller can't know that DLL is required since there is no direct reference
to it.
One question though: is it really enough to copy that DLL? Isn't TIX made of
many TCL files which should be packaged as well within the executable?
--
Giovanni Bajo
Shane
I filed a bug report accordingly:
http://pyinstaller.python-hosting.com/ticket/11
Shane