pyinstaller --onefile --windowed --icon=timer.ico stopwatch.py --onefile:将所有依赖项打包成单个 exe 文件。 --windowed:不显示命令行窗口(仅适用于 GUI 程序)。