Make Stand Alone W32 Installer Crash with tk

Gordon Williams g_will at cyberus.ca
Fri Oct 8 07:54:14 EDT 1999


Hi All,

I have been trying to get Gordon McMillan's and Thomas Heller's win32
installer to work properly to make a stand alone .exe which uses tk.  I
have tried Installer_b_02a and _b_02b as well as the non-beta version. 
They all have the same problem with the tk and tlc libraries not being
found.  This happens 19 times out of 20, but for some reason it does work
sometimes.  As a newbie trying to hack something together for my first
time, I cant figure out what the problem is.  I have tried adding extra
paths to just about everything, putting the installer in different
directories relative to the Python directory, runing it under command line
python and pythonWin, ... etc.

The main script is very simple, a hello world kind of thing, where a couple
of buttons and a canvas oval are put on the screen.  Only Tkinter is
imported.

During making the stand alone with builder.py the following occurs:  
Traceback (innermost last):
  File "E:\Program Files\Python\Pythonwin\pywin\framework\scriptutils.py",
line 237, in RunScript
    exec codeObject in __main__.__dict__
  File "E:\Program Files\Python\Installer_b_03b\install\create\Builder.py",
line 496, in ?
    main(opts, args)
  File "E:\Program Files\Python\Installer_b_03b\install\create\Builder.py",
line 479, in main
    target.build()
  File "E:\Program Files\Python\Installer_b_03b\install\create\Builder.py",
line 302, in build
    lTOC = self.buildTOC()
  File "E:\Program Files\Python\Installer_b_03b\install\create\Builder.py",
line 267, in buildTOC
    self.buildTCLTKsupport(lTOC)
  File "E:\Program Files\Python\Installer_b_03b\install\create\Builder.py",
line 105, in buildTCLTKsupport
    tcllib = os.environ['TCL_LIBRARY']
  File "E:\Program Files\Python\Lib\os.py", line 247, in __getitem__
    return self.data[string.upper(key)]
KeyError: TCL_LIBRARY

The Builder.log shows:
<snip>
 binary dependencies of hello.py
[('win32api.pyd', 'E:\\Program Files\\Python\\win32\\win32api.pyd'),
 ('_tkinter.pyd', 'E:\\Program Files\\Python\\DLLs\\_tkinter.pyd')]
[('_tkinter.pyd', 'E:\\Program Files\\Python\\DLLs\\_tkinter.pyd'),
 ('win32api.pyd', 'E:\\Program Files\\Python\\win32\\win32api.pyd'),
 ('zlib.pyd', 'E:\\Program Files\\Python\\DLLs\\zlib.pyd')]
analyzing _tkinter.pyd
 found KERNEL32.dll
 found tcl80.dll
 lib not found: tcl80.dll dependency of  found tk80.dll
 lib not found: tk80.dll dependency of  found python15.dll
 lib not found: python15.dll dependency of  found MSVCRT.dll
analyzing win32api.pyd
 found KERNEL32.dll
 found USER32.dll
 found ADVAPI32.dll
 found SHELL32.dll
 found OLEAUT32.dll
 found PyWinTypes15.dll
 lib not found: PyWinTypes15.dll dependency of  found python15.dll
 lib not found: python15.dll dependency of  found MSVCRT.dll
analyzing zlib.pyd
 found python15.dll
 lib not found: python15.dll dependency of  found MSVCRT.dll
 found KERNEL32.dll
 merged/expanded binary dependencies
[('_tkinter.pyd', 'E:\\Program Files\\Python\\DLLs\\_tkinter.pyd'),
 ('win32api.pyd', 'E:\\Program Files\\Python\\win32\\win32api.pyd'),
 ('zlib.pyd', 'E:\\Program Files\\Python\\DLLs\\zlib.pyd')]
 lTOC after excludes
[('_tkinter.pyd', 'E:\\Program Files\\Python\\DLLs\\_tkinter.pyd'),
 ('win32api.pyd', 'E:\\Program Files\\Python\\win32\\win32api.pyd'),
 ('zlib.pyd', 'E:\\Program Files\\Python\\DLLs\\zlib.pyd')]

Cannot find TCL/TK libs from either the dll's location
or the TCL_LIBRARY & TK_LIBRARY environment variables
Shutting down


My hello.cfg file is:
[MYSINGLEFILE]
name= hello.exe
type= SINGLEFILE
destdir= ./build_hello
bindepends=hello.py
includeTK= 1
zlib= MYZLIB
script= hello.py

[MYZLIB]
name= hello.pyz
dependencies= hello.py
excludes= dospath, posixpath, macpath
includes=


Sorry for adding so much code.  Any ideas on what I need to do?  Has anyone
used it with tk and got it to work? 

Thanks,

Gordon Williams




More information about the Python-list mailing list