组装后的Python应用无法启动
我通过Pyinstaller构建了这个应用程序,添加了所有必要的文件夹来打包应用,还允许使用不是来自应用商店的第三方程序,添加了需要的bin文件夹到PATH中,关闭了Gatekeeper(一个安全功能),但这些都没有用。这个应用只能通过“显示包内容” - “Contents” - “MacOs”来启动,里面有一个控制台应用程序可以启动我的应用。为什么这个.app文件无法直接启动呢?
这是我通过终端组装应用的命令:
python3 -m PyInstaller --noconfirm --onedir --windowed --icon "/Users/s.p/Downloads/CustomTkinter_logo_single.ico" --add-data "/Users/s.p/Documents/programming/bg_gradient.jpg:." --add-data "/Users/s.p/Documents/logo_int.png:." --add-data "/Users/s.p/Library/Python/3.11/lib/python/site-packages/customtkinter:customtkinter/" "/Users/s.p/Documents/programming/My App 1.py"
我添加了所有必要的文件夹来构建这个应用,允许使用不是来自应用商店的第三方程序,添加了需要的bin文件夹到PATH中,关闭了Gatekeeper,但这些都没有解决问题。
0 个回答
暂无回答