我已经使用Tkinter在Python中创建了一个GUI,并且通过单击GUI上的按钮来使用os.system('python_file.py')运行Python文件。我想使用pyinstaller将所有这些Python文件捆绑到一个单独的.exe文件中,同时保持Tkinter文件为主文件。
我在命令行中执行以下操作来创建.exe文件: pyinstaller --debug --onefile --noupx tkinter_app.py
目前我的.spec文件如下:
我不确定如何在上述 .spec 文件中包含其他的 Python 文件,以使整个应用程序正常运行。请问有人可以帮忙吗?
我在命令行中执行以下操作来创建.exe文件: pyinstaller --debug --onefile --noupx tkinter_app.py
目前我的.spec文件如下:
# -*- mode: python -*-
block_cipher = None
a = Analysis(['tkinter_app.py'],pathex=['C:\\test'],binaries=[],datas=[],
hiddenimports=[],hookspath=[],runtime_hooks=[],excludes=[], win_no_prefer_redirects=False,
win_private_assemblies=False, cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
exe = EXE(pyz, a.scripts, a.binaries, a.zipfiles, a.datas, name='tkinter_app', debug=True, strip=False, upx=False,console=True )
我不确定如何在上述 .spec 文件中包含其他的 Python 文件,以使整个应用程序正常运行。请问有人可以帮忙吗?