Py2app program runs from terminal, but not from double clicking icon

65 Views Asked by At

I've created a program using python and tkinter for a simple gui. I packaged the code using py2app into an app. The app attempts to open and after a few seconds just closes.

If I go into the apps package contents and launch it from the macOS folder it runs with no issues.

How can I fix this to run just from double clicking the single icon. Attached is my set up file.

from setuptools import setup

APP = ['/Users/brandon/Desktop/Python/main2.pyw']
DATA_FILES = ['/Users/brandon/Desktop/Python/logo.png']
OPTIONS = {
    'argv_emulation': True,
}

setup(
    app=APP,
    name='Weighted Feed Calculator',
    data_files=DATA_FILES,
    options={'py2app':OPTIONS},
    setup_requres=['py2app'],
)
0

There are 0 best solutions below