[英]EXC_CRASH (SIGABRT) Launch crash for python app created with py2app
I created a python macOS app with py2app but it give me EXC_CRASH (SIGABRT) and won't open my app but when I try to open it from this path:我用 py2app 创建了一个 python macOS 应用程序,但它给了我 EXC_CRASH (SIGABRT) 并且不会打开我的应用程序,但是当我尝试从这个路径打开它时:
myapp.app/contents/macos/myapp
my app open correctly with a new terminal tab.我的应用程序使用新的终端选项卡正确打开。 I can't figure out why the app won't run correctly.
我无法弄清楚为什么该应用程序无法正常运行。 this is the crash report I posted on apple developer forums:
这是我在苹果开发者论坛上发布的崩溃报告:
https://developer.apple.com/forums/thread/710205 https://developer.apple.com/forums/thread/710205
I can't figure out what should I do with this!我不知道该怎么办! any solution?
任何解决方案?
I got an error message:
我收到一条错误消息:
Launch error See the py2app website for debugging launch issues
启动错误 有关调试启动问题,请参阅 py2app 网站
Found that the problem occurs with the program that works with the console!发现问题出在与控制台配合使用的程序上! If you make a program with an interface, for example, tkinter, then I have no problems with generating and launching the application file on click.
如果您制作带有界面的程序,例如 tkinter,那么我在单击时生成和启动应用程序文件没有问题。 If anyone knows how to make a console application in the form of an app for a macbk, then please write...
如果有人知道如何以 macbk 应用程序的形式制作控制台应用程序,那么请写...
For those who have problems working py2app - update all your libraries to the maximum!
对于那些在使用 py2app 时遇到问题的人 - 将所有库更新到最大!
Download:下载:
pip install py2app
Type the following script into the terminal to update everything to the maximum versions:在终端中键入以下脚本以将所有内容更新到最高版本:
for i in $(pip list -o | awk 'NR > 2 {print $1}'); do sudo pip install
-U $i; done
Change to the desired directory with cd:使用 cd 切换到所需的目录:
cd Desktop/NameFolder/FolderProject
!!! !!! Make sure the required py is in your directory with the command:
ls
使用以下命令确保所需的 py 在您的目录中:
ls
Create a setup with:使用以下命令创建设置:
py2applet --make-setup nameProject.py
py2applet --make-setup nameProject.py
Create an alpha version, for a sanity test:创建一个 alpha 版本,用于健全性测试:
python3 setup.py -A
!!! !!! Delete the appeared folders before compiling the following command.
在编译以下命令之前删除出现的文件夹。
Create the final program and make mom happy:创建最终程序并让妈妈开心:
python3 setup.py
PS附言
!!! !!! I use anaconda3.
我使用anaconda3。 It is recommended for newcomers to download it from the official website and update the library.
建议新人从官网下载并更新库。
conda update --all
If you're still having performance issues and aren't building an app file for your console application, then you haven't downloaded the required compatible fresh libraries to do so.如果您仍然遇到性能问题并且没有为您的控制台应用程序构建应用程序文件,那么您还没有下载所需的兼容新库来执行此操作。
I don't know how to solve the problem with the app's performance for a console application, maybe it's not possible to do it, the maximum that I got was to go inside the app file (show package contents) and run the .exec file in the MacOS folder.
我不知道如何解决控制台应用程序的应用程序性能问题,也许无法做到,我得到的最大值是进入应用程序文件(显示包内容)并运行 .exec 文件在 MacOS 文件夹中。
Example of my setup.py made thanks to py2app:感谢 py2app,我的 setup.py 示例:
from setuptools import setup
APP = ['project.py']
APP_NAME = 'TITLE'
DATA_FILES = []
OPTIONS = {
'iconfile': 'icon.png',
'packages':['babel','pytz'],
'argv_emulation' : True,
'plist': {'CFBundleShortVersionString':'0.1.0'}
}
setup(
app=APP,
name=APP_NAME,
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app']
)
Thank you for your attention!感谢您的关注!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.