我正在try 编译一个Tkinter应用程序作为MacOS的可执行文件.我试着用py2app
和pyinstaller
.我几乎成功地使用了py2app
,但它返回以下错误:
回溯
The Info.plist file must have a PyRuntimeLocations array containing string values for preferred Python runtime locations.
These strings should be "otool -L" style mach ids; "@executable_stub" and "~" prefixes will be translated accordingly.
这是setup.py
强的样子:
from setuptools import setup
APP = ['main.py']
DATA_FILES = ['config.json']
OPTIONS = {
'argv_emulation': True
}
setup(
app=APP,
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)
这是目录 struct :
-modules/---__init.py__
| |
| -- gui_module.py
| |
| -- scraper_module.py
| |
| -- app.ico
|
-config.json
|
-countries_list.txt
|
-main.py
|
-requirements.txt
|
-setup.py
如果你需要的话,我很乐意与你分享更多的细节和文件.