将 Python 3.6 脚本转换为 .exe?

Converting Python 3.6 script to .exe?

我想将 .py 文件转换为 .exe。我正在使用 Python 3.6。我已经尝试过 py2exe 和 PyInstaller,但它们似乎无法与 Python 3.6.

一起正常工作

这里是 traceback from PyInstaller.

所以,让我们先试试 Pyinstaller。

$ pyinstaller script.py --onefile

这将生成一个 script.spec 文件 在规范文件中,您可以删除控制台、调试模式等

$ pyinstaller script.py

编辑:Py3.6 isn't supported

如果这不起作用,那么我们可以尝试