将 .pyw 转换为 .exe 并且不打开命令行

convert .pyw to .exe and have the command line not open

我不想打开命令行,因为 tkinter 界面会打开。

我正在使用 pyinstaller,因此在未安装 python 时也能正常工作。我正在使用 python 3.6.0.

我也可以拥有它吗,所以它是一个 exe 文件,不需要 运行。

要避免使用命令行 window,请将 --windowed 添加到您的 PyInstaller 命令行。

要创建 one-file 包,请将 --onefile 添加到您的 PyInstaller 命令行。

这些都记录在 PyInstaller 的选项中。 https://pyinstaller.readthedocs.io/en/stable/usage.html#options