我正在尝试将一个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'],
)
以下是目录结构:
-modules/---__init.py__
| |
| -- gui_module.py
| |
| -- scraper_module.py
| |
| -- app.ico
|
-config.json
|
-countries_list.txt
|
-main.py
|
-requirements.txt
|
-setup.py
如果需要,我很乐意分享更多细节和文件。