[英]App crashes on launch when compiled with py2app and boto3 is included
[英]App crashes on launch after compiled by py2app if 'requests' is included
如果我沒有將 requests 模塊導入我的應用程序,則 My.app 會啟動,但如果包含它,則會在嘗試啟動由 py2app 編譯的.app 時崩潰。 我試圖將請求包含到 Setup.py 中,但它仍然崩潰。
我安裝了 py2app-0.21。運行 Python 3.6.4,MacOs Catalina 10.15.14
來自控制台的錯誤日志:
(org.pythonmac.unspecified.testapp.2888[62145]): Service exited with abnormal code: 255
安裝程序.py
from setuptools import setup
APP = ['test.py']
DATA_FILES = []
OPTIONS = {
'argv_emulation': True,
'includes': ['requests'],
'packages': ['requests', 'rumps']
}
setup(
app=APP,
name='TestApp',
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)
錯誤日志的 unspecified.testapp 部分告訴我,您需要告訴 python 您的應用程序文件實際在哪里(相對路徑?絕對路徑?這取決於您的用例)
使用一些路徑名操作指向test.py
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.