[英]CLI application don't work with py2app macOS Big Sur
im using python 3.9 for make my application, I need to convert it to.app.我使用 python 3.9 来制作我的应用程序,我需要将其转换为.app。 It is CLI so, it hasn't a gui.
它是 CLI,它没有 gui。 I tryed to use py2app but it don't work...
我尝试使用 py2app 但它不起作用......
This is the error:这是错误:
This is my setup.py file:这是我的 setup.py 文件:
from setuptools import setup
APP = ['scanner.py']
OPTIONS = {
'iconfile': f'/Users/stefanoperrucci/Desktop/icon.icns',
'argv_emulation': True,
'packages': ['certifi'],
}
setup(
app=APP,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)
I tryed to copy python libraries into the.app folders but it don't work.我尝试将 python 库复制到 .app 文件夹中,但它不起作用。
The module that I'm using are: os, glob, hashlib, subprocess, firebase ( I've modified this library), Crypto.我正在使用的模块是:os、glob、hashlib、subprocess、firebase(我已经修改了这个库)、Crypto。
Make sure you have your py2app installed properly确保正确安装了 py2app
easiest way:最简单的方法:
pip install -U py2app
You don't need to copy your library to.app folder您无需将库复制到 .app 文件夹
Make sure you running it correctly确保您正确运行它
py2applet --make-setup MyApplication.py
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.