Skip to content Skip to sidebar Skip to footer

Py2app App Not Launching Just Asks If I Want To Terminate The App Or Open Console

So I am working on a little project of mine that I want to distribute easily so naturally, I use py2app to make a single .app file that will execute on any Mac computer. I tried th

Solution 1:

I have been facing a problem with the exact same error code (-67062) and managed to resolve it at least for my machine running Python 3.6.8 on macOS 10.14.2.

Open the file ../Sandwich/Contents/MacOS/Sandwich and see the traceback message in Terminal. If tkinter imports are causing your issue like in my case, downgrade py2app via

pip uninstall py2app

and use an older version, e.g.

pip install py2app==0.12

and run py2app again. If you further encounter import problems of unwanted packages, e.g. pillow, you can exclude them with a workaround found here

from setuptools import setup

APP = ['Sandwich.py']
DATA_FILES = []
OPTIONS = {
    "excludes": ['pillow', 'Image'] # exclude unwanted dependencies
}

setup(
    app=APP,
    data_files=DATA_FILES,
    options={'py2app': OPTIONS},
    setup_requires=['py2app'],
)

Ronald Oussoren discussed debugging ImportErrors in py2app which can be found below for further reading:

https://bitbucket.org/ronaldoussoren/py2app/issues/223/errors-on-compiling-in-py2app-i-have-all

Post a Comment for "Py2app App Not Launching Just Asks If I Want To Terminate The App Or Open Console"