我正試圖用py2app構建一個獨立的osx應用程序,運行我寫的gui。由於我無法做到這一點,我決定檢查是否能夠構建一個獨立的osx應用程序(一個非常基本的應用程序)。OSX 10.11與py2app?
所以我用這個教程:https://www.metachris.com/2015/11/create-standalone-mac-os-x-applications-with-python-and-py2app/
一切似乎向右走,直到我嘗試運行我的別名模式的應用程序是這樣的:
$ ./dist/Sandwich.app/Contents/MacOS/Sandwich
我收到以下消息說:
$ ./dist/Sandwich.app/Contents/MacOS/Sandwich
Dec 28 01:48:51 Sandwich[48299] <Notice>: Traceback (most recent call
last):
Dec 28 01:48:51 Sandwich[48299] <Notice>: File
"/Users/username/Sandwich/dist/Sandwich.app/Contents/Resources/__boot__.py", line 376, in <module>
Dec 28 01:48:51 Sandwich[48299] <Notice>: _run()
Dec 28 01:48:51 Sandwich[48299] <Notice> File"
/Users/username/Sandwich/dist/Sandwich.app/Contents/Resources/__boot__.py", line 361, in _run
Dec 28 01:48:51 Sandwich[48299] <Notice>: with open(script, 'rU') as fp:
Dec 28 01:48:51 Sandwich[48299] <Notice>: IOError: [Errno 2] No such file or directory: '/Users/username/Sandwich/Sandwich.py'
Dec 28 01:48:51 Sandwich[48299] <Notice>: 2016-12-28 01:48:51.258 Sandwich[48299:2126424] Sandwich Error
問:爲了成功創建OSX獨立應用程序,我需要做些什麼?關於py2app的文檔非常簡約,我找不到有同樣問題的人。
我真的很感謝幫助!我一直在嘗試構建一個OSX獨立應用程序一週。提前致謝!