问题描述
这是我第一次创建应用程序,因此我不确定自己做错了什么。每次在exe中启动转换后的python时,如何删除或隐藏此命令提示符?
解决方法
感谢你们的链接。这对我有用: “编辑your_script.spec文件以摆脱控制台的局面。
exe = EXE(pyz,a.scripts,a.binaries,a.zipfiles,a.datas,name='main',debug=False,strip=False,upx=True,console=True )
只需将控制台值更改为False。然后运行:
pyinstaller your_script.spec”
来源:Getting rid of console output when freezing Python programs using Pyinstaller