[Pythonmac-SIG] Tcl/Tk path problems with py2app
John Gleeson
jdgleeson at mac.com
Mon Feb 7 05:20:55 CET 2005
OS X 10.3.7 w/Apple's python framework
py2app 0.1.7
TclTkAquaBI-8.4.9.0.dmg
I am trying to use py2app to build a standalone Leo application from
the latest release of leo <http://leo.sf.net>.
When I execute leo from the command line, its Tcl/Tk gui works as
expected, so I presume Tcl/Tk is installed correctly. I also have a
Leo app created by Guenther Enthaler last summer
<http://sourceforge.net/forum/forum.php?
thread_id=1064013&forum_id=10226> that works fine; it is not
standalone - the user must have Tcl/Tk installed.
But when I launch the standalone Leo.app that I create with py2app, it
fails with
TclError: Can't find a usable init.tcl in the following directories:
/usr/lib/tcl8.4
/System/Library/Frameworks/Python.framework/Versions/2.3/lib/tcl8.4
/System/Library/Frameworks/Python.framework/Versions/lib/tcl8.4
/System/Library/Frameworks/Python.framework/Versions/2.3/library
/System/Library/Frameworks/Python.framework/Versions/library
/System/Library/Frameworks/Python.framework/Versions/tcl8.4.9/library
/System/Library/Frameworks/Python.framework/tcl8.4.9/library
/usr/lib/tcl8.4
This probably means that Tcl wasn't installed properly.
The Tcl and Tk frameworks are in the app bundle (and init.tcl is there
too), but Tcl does not search there. I tried wrapping the Leo
executable in a shell script so I could set the environment variables
TCL_LIBRARY and TK_LIBRARY to point into the frameworks inside the app.
That got me past the TclError above and a similar TkError. The Leo
user ID input dialog even worked. But then Tk failed to draw widgets,
again looking in the wrong places on the system.
Does anyone have any ideas why Leo.app is not using the Tcl and Tk
frameworks that py2app cop-ies into it (or the ones installed on my
system)?
The source I'm using can be downloaded from the following link if
anyone would like to try it out. It also contains logs of all of my
"python setup.py py2app" output and the console output from Leo.app.
The console output includes a dump of my environment variables,
sys.path, etc. (pirated from the Hello.py py2app example).
<http://homepage.mac.com/jdgleeson/.cv/jdgleeson/Public/Leo.zip-
link.zip>
Thanks,
John
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2269 bytes
Desc: not available
Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20050206/defb92e7/attachment.bin
More information about the Pythonmac-SIG
mailing list