当我打开.EXE应用程序时,CMD窗口始终打开
我完成了Python应用程序,然后将其转换为.exe 但是,当我打开.exe文件时,我发现CMD窗口也在应用程序窗口中打开。 我使用了python3.10和tkinter 还使用自动py-to-exe转换
I finished my python application and I converted it to .exe
but when I open the .exe file, I found that the cmd window is also open with the application window.
I used python3.10 and tkinter
also used auto-py-to-exe to convert
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
创建.exe
时,您可以将-noconsole标签添加到命令中
pyinstaller“其他标签” - noconsole app.py
You can add the --noconsole tag to the command when creating the .exe
pyinstaller "other tags" --noconsole app.py
使用Win32Gui和Win32Con模块,通过PIP安装安装它
Use win32gui and win32con modules, installing it by pip install
main.spec
文件。console = true
toconsole = false
main.spec
file in text editor.Console=True
toConsole=False