I am using py2app 0.9
on Mac OSX Yosemite 10.10.1
running Python 3.4
from the anaconda distribution and with Tcl 8.5
.
In earlier attempts, the build would fail, but quick searches revealed solutions to these problems (i.e. including 'packages': ['tkinter', 'matplotlib']
in OPTIONS in setup.py
, and changing line 49 of MachOGraph.py
: loader --> loader_path)
Now py2app
finishes the build, and running in Alias mode my app functions, but when I build in normal mode (python setup.py
py2app
) the resulting app will not open and the console shows the following traceback:
Traceback (most recent call last): File "/Users/ryankeenan/Desktop/fishing/gui_test/dist/deani.app/Contents/Resources/boot.py", line 355, in _run() File "/Users/ryankeenan/Desktop/fishing/gui_test/dist/deani.app/Contents/Resources/boot.py", line 336, in _run exec(compile(source, path, 'exec'), globals(), globals()) File "/Users/ryankeenan/Desktop/fishing/gui_test/dist/deani.app/Contents/Resources/deani.py", line 731, in app = fishingapp() File "/Users/ryankeenan/Desktop/fishing/gui_test/dist/deani.app/Contents/Resources/deani.py", line 536, in init tk.Tk.init(self, *args, **kwargs) File "/Users/ryankeenan/Desktop/fishing/gui_test/dist/deani.app/Contents/Resources/lib/python3.4/tkinter/init.py", line 1851, in init self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) _tkinter.TclError
The frustrating thing is that it doesn't print any error message for "_tkinter.TclError". I've searched quite a bit and failed to find any solutions or replications of this problem. I've tried building various tkinter based apps and they all fail in the same way.
This is occurring at the first call to tk.Tk.init(self, *args, **kwargs) in my code.
My setup.py file looks like this:
from setuptools import setup
APP = ['deani.py']
DATA_FILES = []
OPTIONS = {'packages': ['tkinter','matplotlib'],'argv_emulation': True}
setup(
app=APP,
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'], )