2021年3月29日 星期一

[Python] Nuitka - 將Python 打包成執行檔


官方網址
https://nuitka.net
https://github.com/Nuitka

Windows


使用Nuitka 將hello.py 打包
python -m nuitka --mingw64 hello.py
打包時會要求下載 C Caching tool及 MinGW64 C compiler。


打包成一個獨立資料夾
python -m nuitka --mingw64 --standalone hello.py
執行完後會產生 .build及 .dist, .dist就是可以用來單獨執行的資料夾。

沒有留言:

張貼留言