对于非图形界面,需要命令窗口执行的,不要使用这个功能。 方法一:pyinstaller -F mycode.py --noconsole 方法二:pyinstaller -F -w mycode.py (-w就是取消窗口)