This probably means that tk wasn't installed properly.

2,395 views
Skip to first unread message

Lynn Oliver

unread,
Sep 5, 2011, 6:18:22 PM9/5/11
to pyins...@googlegroups.com
I was able to build successfully with Python 2.6 and Tcl8.4, but now that I've moved to 2.7.2 and Tcl8.5.10 I'm having problems.

To run in 32-bit mode I set:
alias py32="arch -i386 python"

Makespec step:
py32 Makespec.py -F -K -d --out=../ ../axeomatic.py

Build step:
py32 Build.py ../axeomatic.spec

When I run the resulting program, I get the messages copied below.   Any ideas how I might troubleshoot this? 

Lynns-MacBook-Pro:~ lynn$ /Users/lynn/Documents/python/Axe-O-Matic/dist/axeomatic ; exit;
thisfile is /Users/lynn/Documents/python/Axe-O-Matic/dist/axeomatic
_MEIPASS2 (workpath) is NULL
homepath is /Users/lynn/Documents/python/Axe-O-Matic/dist/
Extracting binaries
Executing self as child with /var/folders/qq/h5gj3f3s0rx41lhd7h0lt2hm0000gn/T//_MEIGAfQHR/
/var/folders/qq/h5gj3f3s0rx41lhd7h0lt2hm0000gn/T//_MEIGAfQHR/
thisfile is /Users/lynn/Documents/python/Axe-O-Matic/dist/axeomatic
_MEIPASS2 (workpath) is /var/folders/qq/h5gj3f3s0rx41lhd7h0lt2hm0000gn/T//_MEIGAfQHR/
homepath is /Users/lynn/Documents/python/Axe-O-Matic/dist/
Already have a workpath - running!
/var/folders/qq/h5gj3f3s0rx41lhd7h0lt2hm0000gn/T//_MEIGAfQHR/Python
Manipulating evironment
PYTHONPATH=/var/folders/qq/h5gj3f3s0rx41lhd7h0lt2hm0000gn/T//_MEIGAfQHR:/Users/lynn/Documents/python/Axe-O-Matic/dist
importing modules from CArchive
extracted iu
extracted struct
extracted archive
Installing import hooks
outPYZ1.pyz
Running scripts
Traceback (most recent call last):
  File "<string>", line 552, in <module>
  File "../build/pyi.darwin/axeomatic/outPYZ1.pyz/Tkinter", line 1685, in __init__
_tkinter.TclError: Can't find a usable tk.tcl in the following directories: 
    /var/folders/qq/h5gj3f3s0rx41lhd7h0lt2hm0000gn/T//_MEIGAfQHR/_MEI/Tk.framework/Resources/Scripts /Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/tk8.5 /Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/tk8.5/Resources/Scripts /Library/Frameworks/Tcl.framework/Versions/8.5/Resources/tk8.5 /Library/Frameworks/Tcl.framework/Versions/8.5/Resources/tk8.5/Resources/Scripts /Users/lynn/Documents/python/Axe-O-Matic/lib/tk8.5 /Users/lynn/Documents/python/Axe-O-Matic/lib/tk8.5/Resources/Scripts ~/Library/Tcl/tk8.5 ~/Library/Tcl/tk8.5/Resources/Scripts /Library/Tcl/tk8.5 /Library/Tcl/tk8.5/Resources/Scripts /System/Library/Tcl/tk8.5 /System/Library/Tcl/tk8.5/Resources/Scripts ~/Library/Frameworks/tk8.5 ~/Library/Frameworks/tk8.5/Resources/Scripts /Library/Frameworks/tk8.5 /Library/Frameworks/tk8.5/Resources/Scripts /System/Library/Frameworks/tk8.5 /System/Library/Frameworks/tk8.5/Resources/Scripts /Library/Tcl/teapot/package/macosx10.7-x86_64/lib/tk8.5 /Library/Tcl/teapot/package/macosx10.7-x86_64/lib/tk8.5/Resources/Scripts /Library/Tcl/teapot/package/macosx10.7-universal/lib/tk8.5 /Library/Tcl/teapot/package/macosx10.7-universal/lib/tk8.5/Resources/Scripts /Library/Tcl/teapot/package/macosx10.7-i386-x86_64/lib/tk8.5 /Library/Tcl/teapot/package/macosx10.7-i386-x86_64/lib/tk8.5/Resources/Scripts /Library/Tcl/teapot/package/macosx10.6-x86_64/lib/tk8.5 /Library/Tcl/teapot/package/macosx10.6-x86_64/lib/tk8.5/Resources/Scripts /Library/Tcl/teapot/package/macosx10.6-universal/lib/tk8.5 /Library/Tcl/teapot/package/macosx10.6-universal/lib/tk8.5/Resources/Scripts /Library/Tcl/teapot/package/macosx10.6-i386-x86_64/lib/tk8.5 /Library/Tcl/teapot/package/macosx10.6-i386-x86_64/lib/tk8.5/Resources/Scripts /Library/Tcl/teapot/package/macosx10.5-x86_64/lib/tk8.5 /Library/Tcl/teapot/package/macosx10.5-x86_64/lib/tk8.5/Resources/Scripts /Library/Tcl/teapot/package/macosx10.5-universal/lib/tk8.5 /Library/Tcl/teapot/package/macosx10.5-universal/lib/tk8.5/Resources/Scripts /Library/Tcl/teapot/package/macosx10.5-i386-x86_64/lib/tk8.5 /Library/Tcl/teapot/package/macosx10.5-i386-x86_64/lib/tk8.5/Resources/Scripts /Library/Tcl/teapot/package/macosx-x86_64/lib/tk8.5 /Library/Tcl/teapot/package/macosx-x86_64/lib/tk8.5/Resources/Scripts /Library/Tcl/teapot/package/macosx-universal/lib/tk8.5 /Library/Tcl/teapot/package/macosx-universal/lib/tk8.5/Resources/Scripts /Library/Tcl/teapot/package/macosx-i386-x86_64/lib/tk8.5 /Library/Tcl/teapot/package/macosx-i386-x86_64/lib/tk8.5/Resources/Scripts /Library/Tcl/teapot/package/tcl/lib/tk8.5 /Library/Tcl/teapot/package/tcl/lib/tk8.5/Resources/Scripts /Users/lynn/Documents/python/lib/tk8.5 /Users/lynn/Documents/python/Axe-O-Matic/library

/var/folders/qq/h5gj3f3s0rx41lhd7h0lt2hm0000gn/T//_MEIGAfQHR/_MEI/Tk.framework/Resources/Scripts/tk.tcl: version conflict for package "Tk": have 8.5.10, need exactly 8.5.9
version conflict for package "Tk": have 8.5.10, need exactly 8.5.9
    while executing
"package require -exact Tk  8.5.9"
    (file "/var/folders/qq/h5gj3f3s0rx41lhd7h0lt2hm0000gn/T//_MEIGAfQHR/_MEI/Tk.framework/Resources/Scripts/tk.tcl" line 20)
    invoked from within
"source /var/folders/qq/h5gj3f3s0rx41lhd7h0lt2hm0000gn/T//_MEIGAfQHR/_MEI/Tk.framework/Resources/Scripts/tk.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list source $file]"

This probably means that tk wasn't installed properly.

RC: -1 from axeomatic
OK.
Back to parent...
logout

[Process completed]

Lynn Oliver

unread,
Sep 6, 2011, 3:29:18 AM9/6/11
to pyins...@googlegroups.com
Some more data to add.

Here are the messages generated by running Configure.py for Pyinstaller versions 1.5 and 1.5.1.  I'm not sure how to interpret this information; 
can anyone shed some light as to what is going on?

If I run py32 Configure.py for pyinstaller-1.5, I get:

Lynns-MacBook-Pro:pyinstaller-1.5 lynn$ py32 Configure.py
I: read old config from config.dat
I: computing EXE_dependencies
I: Finding TCL/TK...
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
I: Adding Python dependency of Python
I: Skipping libSystem.B.dylib dependency of Python
I: Skipping CoreFoundation dependency of Python
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/Python
I: Skipping libSystem.B.dylib dependency of Python
I: could not find TCL/TK
I: testing for Zlib...
I: ... Zlib available
I: Testing for Unicode support...
I: ... Unicode available
I: testing for UPX...
sh: upx: command not found
I: ...UPX unavailable
I: computing PYZ dependencies...
I: done generating config.dat

If I run py32 Configure.py for pyinstaller-1.5.1, I get:

Lynns-MacBook-Pro:pyinstaller-1.5.1 lynn$ py32 Configure.py
I: read old config from config.dat
I: computing EXE_dependencies
I: Finding TCL/TK...
W: library kernel32.dll required via ctypes not found
W: library coredll.dll required via ctypes not found
W: library kernel32.dll required via ctypes not found
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_bisect.so
I: Skipping libSystem.B.dylib dependency of _bisect.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_multibytecodec.so
I: Skipping libSystem.B.dylib dependency of _multibytecodec.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_struct.so
I: Skipping libSystem.B.dylib dependency of _struct.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/datetime.so
I: Skipping libSystem.B.dylib dependency of datetime.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_codecs_iso2022.so
I: Skipping libSystem.B.dylib dependency of _codecs_iso2022.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ctypes.so
I: Skipping libSystem.B.dylib dependency of _ctypes.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_tkinter.so
I: Adding Tcl dependency of _tkinter.so
I: Adding Tk dependency of _tkinter.so
I: Skipping libSystem.B.dylib dependency of _tkinter.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_codecs_tw.so
I: Skipping libSystem.B.dylib dependency of _codecs_tw.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/math.so
I: Skipping libSystem.B.dylib dependency of math.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/fcntl.so
I: Skipping libSystem.B.dylib dependency of fcntl.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_hashlib.so
I: Skipping libssl.0.9.8.dylib dependency of _hashlib.so
I: Skipping libcrypto.0.9.8.dylib dependency of _hashlib.so
I: Skipping libSystem.B.dylib dependency of _hashlib.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_functools.so
I: Skipping libSystem.B.dylib dependency of _functools.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_locale.so
I: Skipping CoreFoundation dependency of _locale.so
I: Skipping libSystem.B.dylib dependency of _locale.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_random.so
I: Skipping libSystem.B.dylib dependency of _random.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/itertools.so
I: Skipping libSystem.B.dylib dependency of itertools.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cStringIO.so
I: Skipping libSystem.B.dylib dependency of cStringIO.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_codecs_jp.so
I: Skipping libSystem.B.dylib dependency of _codecs_jp.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/operator.so
I: Skipping libSystem.B.dylib dependency of operator.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/array.so
I: Skipping libSystem.B.dylib dependency of array.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/select.so
I: Skipping libSystem.B.dylib dependency of select.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_heapq.so
I: Skipping libSystem.B.dylib dependency of _heapq.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/binascii.so
I: Skipping libz.1.dylib dependency of binascii.so
I: Skipping libSystem.B.dylib dependency of binascii.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_collections.so
I: Skipping libSystem.B.dylib dependency of _collections.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cPickle.so
I: Skipping libSystem.B.dylib dependency of cPickle.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_codecs_cn.so
I: Skipping libSystem.B.dylib dependency of _codecs_cn.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/unicodedata.so
I: Skipping libSystem.B.dylib dependency of unicodedata.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_codecs_kr.so
I: Skipping libSystem.B.dylib dependency of _codecs_kr.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/zlib.so
I: Skipping libz.1.dylib dependency of zlib.so
I: Skipping libSystem.B.dylib dependency of zlib.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/strop.so
I: Skipping libSystem.B.dylib dependency of strop.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/readline.so
I: Skipping libedit.2.dylib dependency of readline.so
I: Skipping libncurses.5.4.dylib dependency of readline.so
I: Skipping libSystem.B.dylib dependency of readline.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/bz2.so
I: Skipping libbz2.1.0.dylib dependency of bz2.so
I: Skipping libSystem.B.dylib dependency of bz2.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/time.so
I: Skipping libSystem.B.dylib dependency of time.so
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_codecs_hk.so
I: Skipping libSystem.B.dylib dependency of _codecs_hk.so
I: Analyzing /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl
I: Skipping libSystem.B.dylib dependency of Tcl
I: Skipping CoreFoundation dependency of Tcl
I: Skipping libgcc_s.1.dylib dependency of Tcl
I: Analyzing /Library/Frameworks/Tk.framework/Versions/8.5/Tk
I: Skipping libSystem.B.dylib dependency of Tk
I: Skipping CoreFoundation dependency of Tk
I: Skipping Cocoa dependency of Tk
I: Skipping Carbon dependency of Tk
I: Skipping IOKit dependency of Tk
I: Skipping libgcc_s.1.dylib dependency of Tk
I: Skipping libobjc.A.dylib dependency of Tk
I: Skipping CoreServices dependency of Tk
I: Skipping ApplicationServices dependency of Tk
I: Skipping Foundation dependency of Tk
I: Skipping AppKit dependency of Tk
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
I: Adding Python dependency of Python
I: Skipping libSystem.B.dylib dependency of Python
I: Skipping CoreFoundation dependency of Python
I: Analyzing /Library/Frameworks/Python.framework/Versions/2.7/Python
I: Skipping libSystem.B.dylib dependency of Python
I: found TCL/TK
I: testing for Zlib...
I: ... Zlib available
I: Testing for Unicode support...
I: ... Unicode available
I: testing for UPX...
sh: upx: command not found
I: ...UPX unavailable
I: computing PYZ dependencies...
I: done generating config.dat

Begin forwarded message:

Martin Zibricky

unread,
Sep 7, 2011, 6:16:08 AM9/7/11
to pyins...@googlegroups.com
Lynn Oliver píše v Út 06. 09. 2011 v 00:29 -0700:

> Here are the messages generated by running Configure.py for
> Pyinstaller versions 1.5 and 1.5.1. I'm not sure how to interpret
> this information; can anyone shed some light as to what is going on?

Could it mean that 1.5 does not work and 1.5.1 works?

or it could be related to the following bug:

http://www.pyinstaller.org/ticket/396

Lynn Oliver

unread,
Sep 8, 2011, 6:34:37 PM9/8/11
to pyins...@googlegroups.com
To get v1.5 to locate binary dependencies for tk, I had to change a line in Configure.py from a.analyze_r('tkinter') to a.analyze_r('Tkinter').  

I still have the original problem: tcl: version conflict for package "Tk": have 8.5.10, need exactly 8.5.9.

I believe the problem is that _tkinter.so was built for Tcl/Tk 8.5.9, while Python is finding Tcl/Tk 8.5.10 in /Library/Frameworks.  

$ otool -L _tkinter.so
_tkinter.so:
/Library/Frameworks/Tcl.framework/Versions/8.5/Tcl (compatibility version 8.5.0, current version 8.5.9)
/Library/Frameworks/Tk.framework/Versions/8.5/Tk (compatibility version 8.5.0, current version 8.5.9)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0)

Any suggestions for fixing or working around this?

Lynn




--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To post to this group, send email to pyins...@googlegroups.com.
To unsubscribe from this group, send email to pyinstaller...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyinstaller?hl=en.


Lynn

unread,
Sep 10, 2011, 4:06:54 PM9/10/11
to PyInstaller
Instead of installing with Brew, I built Python 2.7.2 manually. I now
have the file /Library/Frameworks/Tk.framework/Versions/8.5/Resources/
Scripts/tk.tcl,
that contains "package require -exact Tk 8.5.10".

Config.dat has the following lines:
'TCL_dirname': 'Tcl.framework',
'TCL_root': '/Library/Frameworks/Tcl.framework/Versions/Current',
'TK_dirname': 'Tk.framework',
'TK_root': '/Library/Frameworks/Tk.framework/Versions/Current',

and

'/Library/Frameworks/Python.framework/Versions/2.7/Resources/
Python.app/Contents/MacOS/Python',
'pythonDebug': True,
'pythonVersion': '2.7.2 (default, Sep 10 2011, 10:33:50) \n[GCC
4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)]',

which matches the version that I built this morning.

But I am still having the original problem:

/var/folders/qq/h5gj3f3s0rx41lhd7h0lt2hm0000gn/T//_MEICpTIkB/_MEI/
Tk.framework/Resources/Scripts/tk.tcl: version conflict for package
"Tk": have 8.5.10, need exactly 8.5.9

If I look at /System/Library/Frameworks/Tk.framework/Versions/8.5/
Resources/Scripts/tk.tcl, I see "package require -exact Tk 8.5.9".

Why is Pyinstaller getting this from /System/Frameworks... ?


Message has been deleted

Lynn

unread,
Sep 12, 2011, 2:09:53 PM9/12/11
to PyInstaller
Not that anyone is listening, but I have finally got this working. I
set up a new OS X machine with Lion 10.7.1, and I'm doing the build
with pyinstaller-1.5.1 with a couple of modifications:
1. I replaced the OS X bootloader files with the ones from v1.5
2. I added the following patch to Build.py at line 1193:
if self.name is None:
self.appname = "Mac%s" % (os.path.splitext(inm)
[0],)
self.name = os.path.join(SPECPATH, self.appname +
".app")
I: else:
I: self.name = os.path.join(SPECPATH, self.name)

I'm using the Apple versions of Python 2.7 and Tcl/tk 8.5. I
originally started all this to be able to use matplotlib, and I have
that installed and working on the same machine, building from the most
recent sources in the repository.

Martin Zibricky

unread,
Sep 12, 2011, 2:47:40 PM9/12/11
to pyins...@googlegroups.com
Lynn píše v Po 12. 09. 2011 v 11:09 -0700:
> 1. I replaced the OS X bootloader files with the ones from v1.5.

In 1.5.1 there is a 64bit loader in the path of 32bit loader:
http://www.pyinstaller.org/ticket/396


Reply all
Reply to author
Forward
0 new messages