![](/img/trans.png)
[英]How do I compile a PyQt script (.py) to a single standalone executable file for windows (.exe) and/or linux?
[英]How to compile python script to standalone executable windows file that could open without shell
我有一個python腳本,我想為Windows制作一個.exe文件。 並在后台運行它,這意味着不顯示shell。
我使用: pyinstaller --onefile script.py
但外殼顯示......
如果你的主要目的是使文件在后台運行(即不顯示shell),那么你可以簡單地將python文件重命名為.pyw
文件,並運行它,這意味着你的文件變成了script.pyw
。 您還可以在script.pyw
文件上使用相同的pyinstaller
命令
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.