如何使用pyinstaller将 pyw 文件转换为 exe ,如果不可能,我该怎么办?用py2exe做吗?
我正在使用 python 3 !
答案 0 :(得分:3)
只需运行以下命令
pyinstaller -w your_file_name.pyw
注意:在运行上述命令之前需要安装pyinstaller。要安装,请运行以下命令
pip install pyinstaller
答案 1 :(得分:2)
因为您使用Python 3,所以不可能使用Py2exe(因为这仅适用于Python 2)。
将.pyw程序重命名为.py并运行(假设您已安装Pyinstaller):
pyinstaller file.py
并使用--windowed
标记to hide the console。