【笔记】Nuitka学习笔记
前言
Nuitka is the optimizing Python compiler written in Python that creates executables that run without a separate installer. Data files can both be included or put alongside.(官网)
下载依赖
1 | pip3 install nuitka |
打包为EXE可执行文件
--standalone:打包为一个可移植的exe文件,其依赖会附加在文件夹内--onefile:打包为一个可移植的exe文件,其依赖会打包进exe文件内--lto:启用链接时间优化--remove-output:打包结束后清理临时文件--disable-console:程序执行时不弹出CMD窗口
1 | python3 -m nuitka <file>.py |
1 | nuitka <file>.py |