py2app app works only if launched from terminal

孤街醉人 提交于 2019-12-24 11:24:17

问题


I have just packaged my app (OSX 10.12.15 - python3.6 - py2app 0.12) and my application works only if launched from the terminal with MyApp.app/Contents/MacOS/MyApp. If I click on the app in the GUI, it doesn't start.

This is my setup.py:

from setuptools import setup

    APP = ['mq.py']
    DATA_FILES = []
    OPTIONS = {
        'iconfile':'icons/mq.icns',
            'plist': {'CFBundleShortVersionString':'0.1.0',}
    }

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

来源:https://stackoverflow.com/questions/44764420/py2app-app-works-only-if-launched-from-terminal

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!