Nuitka compiles Python programs into C-level binaries that run with libpython. It targets broad CPython versions on Linux, macOS, Windows, and other platforms supported by Python.
Overview
Nuitka is a Python compiler written in Python that translates modules into C programs linked with libpython, aiming to stay highly compatible with CPython semantics while reducing overhead. It accepts constructs from supported Python 2 and 3 releases when run under matching interpreters.
You invoke it from the command line, commonly as python -m nuitka, optionally following imports to bundle whole programs. Output modes include accelerated modules, standalone folders that ship dependencies, and one-file executables for distribution without a separate Python install on target machines.
Building requires a suitable C or C++ toolchain on each platform, such as MSVC on Windows, gcc or clang elsewhere, or bundled MinGW or zig options where documented. Commercial-oriented messaging highlights IP protection from compiled binaries, runtime performance, and deployment packaging including wheels and GitHub Actions integration.
Typical workflows compile a script after verifying it runs under CPython, then copy standalone or one-file artifacts to other hosts. Compatibility notes stress standard CPython, Anaconda, or Homebrew builds rather than some sandboxed store distributions.
Key features
- CPython-compatible compilation
- Standalone and one-file modes
- Follow-imports program bundling
- Cross-platform binary output
- pip-installable compiler package
- GitHub Actions integration option
- Optional data file inclusion
- Performance-oriented optimizations
Use cases
- Shipping Python apps as binaries
- Hiding source in commercial tools
- Faster program startup
- Deploying without Python runtime
- CI-built release artifacts