从命令行导入
从JSON导入
python -m nuitka
--module
--standalone
--onefile
--python-debug
--mode="accelerated"
--python-flag=
--python-for-scons="undefined"
--prefer-source-code
--follow-imports
--nofollow-imports
--follow-stdlib
--onefile-no-compression
--onefile-as-archive
--onefile-no-dll
--onefile-cache-mode="auto"
--onefile-tempdir-spec="{TEMP}/onefile_{PID}_{TIME}"
--onefile-child-grace-time="5000"
--list-distribution-metadata
--warn-implicit-exceptions
--warn-unusual-code
--assume-yes-for-downloads
--run
--debugger
--full-compat
--remove-output
--no-pyi-file
--no-pyi-stubs
--output-filename="<program_name>"
--output-dir="./"
--deployment
--debug
--no-debug-immortal-assumptions
--no-debug-c-warnings
--unstripped
--profile
--trace-execution
--low-memory
--generate-c-only
--xml="undefined"
--devel-missing-code-helpers
--devel-missing-trust
--devel-recompile-c-only
--devel-internal-graph
--clang
--mingw64
--lto="auto"
--static-libpython="auto"
--msvc="undefined"
--jobs="undefined"
--cf-protection="auto"
--disable-ccache
--disable-dll-dependency-cache
--force-dll-dependency-cache-update
--disable-cache=
--clean-cache=
--pgo-c
--report-diffable
--quiet
--show-scons
--no-progressbar
--show-progress
--show-memory
--show-modules
--verbose
--report="undefined"
--show-modules-output="undefined"
--verbose-output="undefined"
--force-stdout-spec="undefined"
--force-stderr-spec="undefined"
--windows-uac-admin
--windows-uac-uiaccess
--windows-console-mode="force"
--onefile-windows-splash-screen-image="undefined"
--macos-create-app-bundle
--macos-sign
--macos-app-mode="gui"
--macos-target-arch="native"
--macos-app-icon="python"
--macos-signed-app-name="undefined"
--macos-app-name="undefined"
--macos-sign-identity="ad-hoc"
--macos-app-version="undefined"
--linux-icon="undefined"
--company-name="undefined"
--product-name="undefined"
--file-version="undefined"
--product-version="undefined"
--file-description="undefined"
--copyright="undefined"
--trademarks="undefined"
--plugin-list
--enable-plugins=
--disable-plugins=
--target="undefined"
--show-anti-bloat-changes
{
"main": {
"value": [],
"user_provides_choices": {
"main": {
"i18n": "",
"command": {
"original": "main.py"
},
"enabled": true,
"user_provide": true
}
}
},
"onefile_child_grace_time": {
"value": "time",
"user_provides_choices": {
"time": {
"i18n": "",
"command": {
"original": "5000"
},
"enabled": true,
"user_provide": true
}
}
}
}
命令行输出
JSON输出
模块模式 (--module)
独立模式 (--standalone)
单文件模式 (--onefile)
Python调试 (--python-debug)
模式 (--mode)
加速模式 (accelerated)
Python标志 (--python-flag)
选择
Scons的Python路径 (--python-for-scons)
选择
主程序路径 (--main)
选择
首选源代码 (--prefer-source-code)
包含包 (--include-package)
选择
包含模块 (--include-module)
选择
包含插件目录 (--include-plugin-directory)
选择
包含插件文件 (--include-plugin-files)
选择
导入已导入的模块 (--follow-imports)
不进行所有导入 (--nofollow-imports)
跟随导入标准库 (--follow-stdlib)
跟随导入到模块 (--follow-import-to)
选择
不跟随导入模块 (--nofollow-import-to)
选择
无压缩单文件 (--onefile-no-compression)
作为存档的单文件 (--onefile-as-archive)
在单文件中不使用DLL (--onefile-no-dll)
单文件缓存模式 (--onefile-cache-mode)
自动 (auto)
单文件临时目录位置 (--onefile-tempdir-spec)
用户临时目录 ({TEMP}/onefile_{PID}_{TIME})
单文件子进程宽限时间 (--onefile-child-grace-time)
5000
包含包数据 (--include-package-data)
选择
包含数据文件 (--include-data-files)
选择
包含数据目录 (--include-data-dir)
选择
不包含数据文件 (--noinclude-data-files)
选择
包含单文件外部数据 (--include-onefile-external-data)
选择
列出包数据 (--list-package-data)
选择
包含原始文件夹 (--include-raw-dir)
选择
列出分发的元数据 (--list-distribution-metadata)
包含分发元数据 (--include-distribution-metadata)
选择
不包含动态链接库(DLL) (--noinclude-dlls)
选择
列出包动态链接库(DLL) (--list-package-dlls)
选择
列出给定包名的exe文件 (--list-package-exe)
选择
警告隐式异常 (--warn-implicit-exceptions)
警告不寻常代码 (--warn-unusual-code)
假设允许下载 (--assume-yes-for-downloads)
不警告助记符 (--nowarn-mnemonic)
选择
立即执行 (--run)
在调试器中运行 (--debugger)
完全兼容CPython (--full-compat)
用户包配置文件 (--user-package-configuration-files)
选择
文件引用选择 (--file-reference-choice)
选择
模块名称选择 (--module-name-choice)
选择
删除构建文件夹 (--remove-output)
不生成pyi文件 (--no-pyi-file)
不创建pyi存根 (--no-pyi-stubs)
输出文件名 (--output-filename)
程序名 (<program_name>)
输出目录 (--output-dir)
当前目录 (./)
部署模式 (--deployment)
不使用部署标志 (--no-deployment-flag)
选择
强制运行时环境变量 (--force-runtime-environment-variable)
选择
调试模式 (--debug)
禁用对不朽对象(Immortal Objects)的调试假设 (--no-debug-immortal-assumptions)
禁用C调试警告 (--no-debug-c-warnings)
不去除调试信息 (--unstripped)
性能分析 (--profile)
跟踪执行 (--trace-execution)
低内存模式 (--low-memory)
只生成C源代码 (--generate-c-only)
输出XML (--xml)
选择
实验性 (--experimental)
选择
从报告创建环境 (--create-environment-from-report)
选择
开发-缺失代码助手 (--devel-missing-code-helpers)
开发-报告缺失信任 (--devel-missing-trust)
开发-仅重新编译C源代码 (--devel-recompile-c-only)
开发-内部图 (--devel-internal-graph)
强制使用clang (--clang)
强制使用mingw64 (--mingw64)
链接时间优化 (--lto)
自动 (auto)
使用Python的静态链接库 (--static-libpython)
自动 (auto)
使用MSVC版本 (--msvc)
选择
并行编译任务数 (--jobs)
选择
gcc编译器CF保护模式 (--cf-protection)
自动 (auto)
禁用ccache (--disable-ccache)
禁用dll依赖项缓存 (--disable-dll-dependency-cache)
强制更新dll依赖项缓存 (--force-dll-dependency-cache-update)
禁用缓存 (--disable-cache)
选择
清理缓存 (--clean-cache)
选择
配置文件引导优化 (--pgo-c)
配置文件引导优化参数 (--pgo-args)
选择
配置文件引导优化可执行文件 (--pgo-executable)
选择
报告差异 (--report-diffable)
静默模式 (--quiet)
显示scons (--show-scons)
不显示进度条 (--no-progressbar)
显示进度 (--show-progress)
显示内存 (--show-memory)
显示模块 (--show-modules)
详细模式 (--verbose)
输出报告 (--report)
选择
显示模块输出路径 (--show-modules-output)
选择
详细模式输出路径 (--verbose-output)
选择
报告用户提供值 (--report-user-provided)
选择
报告模板 (--report-template)
选择
强制标准输出规范 (--force-stdout-spec)
选择
强制标准错误规范 (--force-stderr-spec)
选择
请求Windows用户控制(UAC)管理员权限 (--windows-uac-admin)
请求Windows用户控制(UAC)UI访问权限 (--windows-uac-uiaccess)
Windows控制台模式 (--windows-console-mode)
强制模式 (force)
单文件Windows启动画面图像 (--onefile-windows-splash-screen-image)
选择
windows图标(ico文件) (--windows-icon-from-ico)
选择
windows图标(exe文件) (--windows-icon-from-exe)
选择
创建MacOS应用程序包 (--macos-create-app-bundle)
MacOS签名认证 (--macos-sign)
macOS应用程序模式 (--macos-app-mode)
GUI模式 (gui)
MacOS目标架构 (--macos-target-arch)
本地架构 (native)
MacOS应用程序图标路径 (--macos-app-icon)
Python图标 (python)
MacOS签名应用程序名称 (--macos-signed-app-name)
选择
macOS应用程序名称 (--macos-app-name)
选择
MacOS签名标识 (--macos-sign-identity)
自由签名 (ad-hoc)
macOS应用程序版本 (--macos-app-version)
1.0
请求macOS受保护的资源 (--macos-app-protected-resource)
选择
Linux图标 (--linux-icon)
选择
公司名称 (--company-name)
选择
产品名称 (--product-name)
选择
文件版本 (--file-version)
选择
产品版本 (--product-version)
选择
文件描述 (--file-description)
选择
版权文本 (--copyright)
选择
商标文本 (--trademarks)
选择
插件列表 (--plugin-list)
启用插件 (--enable-plugins)
选择
禁用插件 (--disable-plugins)
选择
用户插件 (--user-plugin)
选择
模块参数 (--module-parameter)
选择
显示源代码更改 (--show-source-changes)
选择
目标 (--target)
选择
显示反膨胀更改 (--show-anti-bloat-changes)
不包含setuptools模式 (--noinclude-setuptools-mode)
选择
不包含pytest模式 (--noinclude-pytest-mode)
选择
不包含单元测试模式 (--noinclude-unittest-mode)
选择
不包含pydoc模式 (--noinclude-pydoc-mode)
选择
不包含IPython模式 (--noinclude-IPython-mode)
选择
不包含dask模式 (--noinclude-dask-mode)
选择
不包含numba模式 (--noinclude-numba-mode)
选择
不包含默认模式 (--noinclude-default-mode)
选择
不包含自定义模式 (--noinclude-custom-mode)
选择
playwright包含浏览器 (--playwright-include-browser)
选择
spaCy语言模型 (--spacy-language-model)
选择
基本设置
控制结果中包含的模块和包
控制导入模块
单文件选项
数据文件
元数据支持
DLL(动态链接库)文件
控制 Nuitka 发出的警告
编译后立刻执行
编译选项
输出选项
部署控制
环境控制
调试功能
Nuitka 开发功能
后端C编译器选择
缓存控制
PGO(配置文件引导优化)编译选项
跟踪功能
通用操作系统设置
Windows 特定控制
macOS 特定控制
Linux 特定控制
二进制版本信息
插件控制
交叉编译
'反膨胀'插件选项(分类: 核心)
'Playwright'插件选项
Spacy插件选项(分类: 包支持)
输入
输出
编辑