nicegui打包出来的exe,在本机上可以运行,在别的机器上运行,有的不显示界面,有的只显示一个窗口,内容都是空白,请问这是咋回事。
1、运行方式是本地运行ui.run(native=True)。
cmd = ['PyInstaller',
'find_same_friend.py', #your main file with ui.run()
'--name', 'myapp', #name of your app
'--onefile',
# '--windowed',
'--clean',
'--add-data', f'{Path(nicegui.__file__).parent}{os.pathsep}nicegui'
]
subprocess.call(cmd)
2、打包代码:
相似问题