30 May 2025
Nuitka Release 2.7
This is to inform you about the new stable release of Nuitka. It is the extremely compatible Python compiler, “download now”.
This release adds a ton of new features and corrections. macOS: Correctly recognize self-dependencies of DLLs that include an architecture suffix on Standalone: Resolved an issue where Standalone: Fixed Standalone: Corrected the While this primarily affected the module’s Multidist: Ensured created binaries use the name they were launched with, rather than the path of the actual binary file. This allows entry points invoked via Windows: Fixed unusable Modules: Prevented crashes in module mode when encountering potentially optimizable Python3: Resolved errors with newer Windows: Removed a UTF-8 comment from a C header file that could prevent MSVC from compiling correctly in certain system locales. (Fixed in 2.6.2 already.) Standalone: Ensured that user-inhibited data files have their associated tags cleared to prevent confusion in plugins. (Fixed in 2.6.2 already.) Standalone: Corrected Previously, if a package directory existed, Python’s file finder could interfere, yielding incomplete results that excluded compiled modules. (Fixed in 2.6.2 already.) Windows: Addressed a C compiler warning related to onefile compression on 32-bit Windows during bootstrap compilation. Python3.12+: Resolved a Metadata: Handled cases where reading record data from distribution files might fail because the files do not always exist. (Fixed in 2.6.3 already.) Compatibility: Fixed dependency resolution for shared libraries that are symbolic links on non-Windows platforms. Resolution failed if dependencies originated from the symlink target and that target was not in the system library path or nearby as another symlink. (Fixed in 2.6.3 already.) Standalone: Prevented the use of Standalone: Fixed UI: Corrected the output of DLL and EXE listings, which no longer provided the correct sub-folder information. (Fixed in 2.6.3 already.) macOS: Restored the attachment of icons to application bundles. (Fixed in 2.6.3 already.) Onefile: Resolved a C compiler warning on 32-bit Windows related to missing type conversion for the decompression buffer size. (Fixed in 2.6.3 already.) Python3.12+: Ensured type aliases have a usable Python3.12+: Improved compatibility for type alias values. Corrected the creation process for compound type aliases, resolving errors in libraries like Python3.12+: Implemented a workaround for extension modules failing to set the correct package context, which previously caused significant compatibility issues (e.g., namespace collisions). This was particularly problematic when static libpython was unavailable (common on Windows and official macOS CPython). The workaround involves saving/restoring the module context and correcting potentially wrongly named sub-modules created during extension module loading. This improves compatibility for packages like Plugins: Prevented a crash in the Nuitka Package Configuration helper function Standalone: Corrected the rpath value used for finding dependent DLLs in sub-folders on non-Windows platforms. It previously excluded the DLL’s own folder ( Standalone: Preserved existing Some PyPI packages rely on these existing paths to reference content in other packages; replacing them previously broke these setups. (Fixed in 2.6.7 already.) Standalone: Now treats shared library dependencies specified with paths as implicit rpaths. This fixes builds using Python distributions like Python Build Standalone (installed by Python3: Ensured generators preserve external exceptions and restore their own upon resuming. This fixes issues where generators used as context managers, handling an exception via Android: Removed the Termux While ineffective after APK packaging due to Android security, this value should not have been present. (Fixed in 2.6.7 already.) Python Build Standalone: Added the rpath to This resolves issues with uninstalled Standalone: Resolved incompatibility with older Linux distributions caused by using newer Python3.9: Fixed errors in the Standalone: Prevented Distutils on macOS: Improved integration for scanned extension modules where determining the correct architecture can be difficult. (Fixed in 2.6.8 already.) Windows: Defined Scons: Ensured the correct Scons: Avoided using This prevents potential race conditions during the first use where multiple Standalone: Ensured extension modules are loaded during the Loading them later during Python3.13: Corrected the workaround for extension module package context issues, resolving errors that occurred when the module and package names were identical. Module: Prevented stub generation attempts for namespace packages, which previously resulted in warnings as there is no source code to process. Debian: Ensured consistent casing for the installer name used in Debian package metadata. Poetry: Updated detection logic for newer Module: Improved stub generation ( Plugins: Fixed potential corruption and crashes in the Standalone: Added support for newer Accelerated: Prevented Nuitka’s Python3.12.7+: Set additional unicode immortal attributes (including for non-attributes) to prevent triggering Python core assertions when enabled. Compatibility: Ensured errors are properly fetched during class variable lookups. Previously, an error exit could occur without an exception being set, leading to crashes when attempting to attach tracebacks. Python3.13: Adapted dictionary value creation and copying to follow internal layout changes, preventing potential crashes and corruption caused by using obsolete Python 3.11/3.12 code. Scons: Corrected the default LTO module count calculation to refer to the number of compiled modules. Package: Ensured namespace parent modules are included in compiled packages. These were previously missed due to the removal of reliance on macOS: Ensured data files included in application bundles are also signed. Windows: Applied short path conversion to the directory part of This prevents issues with tools called using this path that might not handle non-shortened (potentially unicode) paths correctly. Standalone: Included necessary data files for the Standalone: Added support for newer Standalone: Added support for newer Anti-Bloat: Provided additional Standalone: Enhanced configuration for Standalone: Corrected plugin configuration for newer Python3.12+: Introduced standalone support for Python3.12+: Introduced standalone support for Standalone: Added support for newer Standalone: Included Standalone: Added implicit dependencies for macOS: Included additional frameworks required for PySide 6.8 web-engine support. (Added in 2.6.5 already.) Standalone: Enhanced Standalone: Added support for the By treating it as a lazy loader, implicit dependencies within Standalone: Automatically include Django database engine modules. (Added in 2.6.7 already.) Homebrew: Added Standalone: Included a missing data file for the Standalone: Added support for newer Anaconda: Fixed issues with bare Standalone: Included a missing data file for the Compatibility: Enabled pickling of local compiled functions using Standalone: Added support for Standalone: Included necessary data files for Standalone: Added support for newer Standalone: Introduced support for the Standalone: Included metadata when the Standalone: Significantly enhanced support for detecting dependencies derived from Standalone: Added support for the DLL Mode: Introduced a new experimental mode ( While functional for many cases, documentation is currently limited, and features like multiprocessing require further work involving interaction with the launching binary. This mode is intended to improve Windows GUI compatibility (tray icons, notifications) for onefile applications by utilizing an internal DLL structure. Windows: Onefile mode now internally uses the new DLL mode by default, interacting with a DLL instead of an executable in temporary mode. Use Windows: Added support for dependency analysis on Windows ARM builds using Android: Enabled module mode support when using Termux Python. (Added in 2.6.7 already.) Compatibility: Added support for Python Build Standalone distributions (e.g., as downloaded by Note that static Windows: Enabled taskbar grouping for compiled applications if product and company names are provided in the version information. (Added in 2.6.4 already.) Windows: Automatically use icons provided via This eliminates the need to separately provide the icon as a PNG file, avoiding duplication. Nuitka Package Configuration: Allowed using values from Reports: Clearly indicate if an included package is “vendored” (e.g., packages bundled within Compatibility: Added support for the Compatibility: Added support for the UI: Introduced a new experimental tool for scanning distribution metadata, producing output similar to Plugins: Enhanced the Added an option to control whether the plugin should also handle AIX: Implemented initial enhancements towards enabling Nuitka usage on AIX, although further work is required. Optimized finalizer handling in compiled generators, coroutines, and asyncgens by avoiding slower C API calls introduced in 2.6, restoring performance for these objects. Implemented a more compact encoding for empty strings in data blobs. Instead of 2 bytes (unicode) + null terminator, a dedicated type indicator reduces this frequent value to a single byte. Avoided including Avoided including Avoided including Avoided including Avoided including Avoided including Also prevented attempts to query the version from Avoided including Avoided including Avoided including Avoided including Avoided including Avoided including more optional Avoided including Avoided including For reporting purposes, treated usage of Added support for UI: Improved the output format for used command line options. Filenames provided as positional arguments now use the report path format. Info traces now support an optional leader for intended value output, enhancing readability. Reports: Saved and restored timing information for cached modules. This eliminates timing differences based on whether a module was loaded from cache, reducing noise in Nuitka-Watch comparisons where cached module timings previously changed with every new compilation. Actions: Added compilation report artifacts to all CI runs involving empty module compilations. Debugging: Enabled the User Manual: Updated the Nuitka-Action example; linking directly to its documentation might be preferable. (Changed in 2.6.1 already.) Quality: Enforced ASCII encoding for all Nuitka C files to prevent accidental inclusion of non-ASCII characters. Quality: Added syntax validation for Also added validation to ensure Plugins: Ensured error messages for illegal module names in implicit imports correctly report the originating plugin name. Quality: Enabled use of Quality: Suppressed UI: Disallowed mixed usage of Anaconda and Poetry without an active Poetry virtual environment. This avoids issues caused by a Poetry bug where it incorrectly sets the macOS: Deprecated Release: Ensured usage of a compatible UI: Improved the error message for invalid custom anti-bloat modes by listing the allowed values. Release: Removed CPython test git submodules from the repository. These submodules caused issues, such as being cloned during Enabled passing extra options via the Removed the standalone test for the Ensured tests correctly ignore the current directory when necessary by using the new This forces the use of the original source code as intended, rather than potentially finding modules in the current directory. Corrected the implementation of the Added support for passing extra options via environment variables to the Distutils: Standardized usage to Refactored This release was supposed to focus on scalability, but that didn’t happen due to a variety of important issues coming up as well as unplanned private difficulties. The added DLL mode will be very interesting to many users, but needs more polish in future releases. For compatibility, working with the popular (yet - not yes recommended UV-Python), Windows UI fixes for temporary onefile and macOS improvements, as well as improved Android support are excellent. The next release of Nuitka however will have to focus on scalability and maintenance only. But as usual, not sure if it can happen.Bug Fixes
x86_64
. (Fixed in 2.6.1 already.).pyi
files associated with versioned extension module filenames were not detected. (Fixed in 2.6.1 already.).pyi
file parsing failures caused by single-line triple quotes. (Fixed in 2.6.1 already.)__spec__.origin
path for packages where __init__
is an extension module.repr
string, code relying on origin
for resource location could previously encounter errors. (Fixed in 2.6.1 already.)subprocess
with different process names to function correctly from a single binary distribution. (Fixed in 2.6.1 already.)sys.stdin
when attaching to a console (--windows-console-mode=attach
) without an active terminal, which previously led to errors when forking processes. (Fixed in 2.6.1 already.)importlib
distribution calls that are non-optimizable in this mode. (Fixed in 2.6.1 already.)setuptools
versions caused by namespace packages not providing a path_finder
. (Fixed in 2.6.1 already.)pkgutil.iter_modules
to prevent incomplete module listings.SystemError
when accessing the module
attribute of type
variables.msvcp140.dll
from PySide6
(specifically shiboken6
) by other packages to avoid potential compatibility crashes. (Fixed in 2.6.3 already.).pyi
file parsing failures caused by comments appearing after import
statements. (Fixed in 2.6.3 already.)module
attribute containing the correct module name. (Fixed in 2.6.3 already.)pydantic
when used in schemas. (Fixed in 2.6.5 already.)PySide6QtAds
, onnx
, mediapipe
, paddleocr
, and newer scipy
versions, which were previously affected. (Fixed in 2.6.6 already.)get_data
when falling back to pkgutil
for data files not found naively. (Fixed in 2.6.6 already.)$ORIGIN
), sometimes preventing DLLs from loading. (Fixed in 2.6.7 already.)$ORIGIN
-relative rpaths in DLLs on Linux.uv
), which may have an $ORIGIN
-relative libpython
dependency that needs to be respected. (Fixed in 2.6.7 already.)yield
, could prevent an outer with
statement from correctly re-raising its own exception. (Fixed in 2.6.7 already.)rpath
value pointing into its installation from standalone builds.libpython
by default in all modes for Python Build Standalone distributions.libpython
on Linux. (Fixed in 2.6.8 already.)patchelf
options introduced in 2.6.8’s rpath changes. (Fixed in 2.6.9 already.)spacy
plugin when using older importlib.metadata
versions. (Fixed in 2.6.8 already.)requests
package imports from being incorrectly treated as sub-packages. (Fixed in 2.6.8 already.)dotnet
as a dependency to ensure all UI features requiring it are properly enabled.link.exe
executable is used for the MSVC backend, avoiding potential conflicts with linkers added to the PATH
(e.g., by git
). (Fixed in 2.6.9 already.)config.txt
with clcache
when using MSVC.clcache
threads might attempt to create the file simultaneously. (Fixed in 2.6.9 already.)create_module
phase of the Nuitka loader for better compatibility.exec_module
caused issues with some extension modules, such as those created by mypy
(used in black
).poetry
versions to handle changes in installer name casing, which could previously impact system DLL usage determination.stubgen
) for generics, handling of missing typing
imports, and other cases.dill-compat
plugin when handling functions with keyword defaults.py-cpuinfo
versions on non-Windows platforms.sys.path_hook
from overriding standard Python path loader hooks, as it doesn’t yet support all their functionalities.--include-package
for delayed namespace package handling.sys.argv[0]
as well.Package Support
blib2to3
package. (Added in 2.6.1 already.)numba
versions. (Added in 2.6.2 already.)huggingface_hub
versions. (Added in 2.6.2 already.)numpy.testing
stubs required for proper execution of some sklearn
modules. (Fixed in 2.6.2 already.)fontTools
. Avoided configuring hidden dependencies now detected by parsing provided Python files like .pyi
files. (Fixed in 2.6.2 already.)PySide6
sqldrivers
on macOS. (Fixed in 2.6.3 already.)mediapipe
, including a workaround for extension module sub-module creation issues. (Fixed in 2.6.3 already.)onnx
, including a workaround for extension module sub-module creation issues. (Fixed in 2.6.3 already.)sqlglot
versions. (Added in 2.6.5 already.)asset
data files for the arcade
package. (Added in 2.6.5 already.)sqlalchemy.orm
. (Added in 2.6.5 already.)cv2
support to handle potentially Python minor version-specific config files by allowing optional data file discovery in plugins. (Added in 2.6.6 already.)scipy
sub-module loader mechanism.scipy
are now correctly detected without requiring explicit configuration. (Added in 2.6.7 already.)tk-inter
support for Python versions using Tcl/Tk version 9.jenn
package.scipy.optimize._cobyla
versions. (Fixed in 2.6.8 already.)mkl
usage (without numpy
).cyclonedx
package.cloudpickle
and ray.cloudpickle
.mitmproxy
on macOS.python-docs
and mne
.toga
versions, requiring handling of its lazy loader.black
code formatter package.travertino
package is used.django
settings.duckdb
package.New Features
--mode=dll
) to create standalone DLL distributions.--onefile-no-dll
to revert to the previous behavior if issues arise.pefile
(as Dependency Walker lacks ARM support).uv
).libpython
is not supported with these distributions as the included static library is currently unusable. (Added in 2.6.7 already.)--windows-icon-from-ico
for PySide6
applications.constants
and variable
declarations within when
conditions where feasible.setuptools
).safe_path
(-P
) Python flag, preventing the use of the current directory in module searches.dont_write_bytecode
(-B
) Python flag, disabling the writing of .pyc
files at runtime (primarily for debugging purposes, as compiled code doesn’t generate them).pip list -v
. Intended for debugging metadata scan results.dill-compat
plugin to transfer __annotations__
and __qualname__
.cloudpickle
and ray.cloudpickle
.Optimization
Anti-Bloat
matplotlib
when used by the tqdm
package. (Added in 2.6.2 already.)matplotlib
when used by the scipy
package. (Added in 2.6.2 already.)cython
when used by the fontTools
package. (Added in 2.6.2 already.)sparse
when used by the scipy
package. (Added in 2.6.3 already.)ndonnx
when used by the scipy
package. (Added in 2.6.3 already.)setuptools
for the jaxlib
package.jaxlib
source code using git. (Added in 2.6.3 already.)yaml
when used by the scipy
package. (Added in 2.6.4 already.)charset_normalizer
for the numpy
package. (Added in 2.6.5 already.)lxml
for the pandas
package. (Added in 2.6.5 already.)PIL
(Pillow) for the sklearn
package. (Added in 2.6.5 already.)numba
when used by the smt
package. (Added in 2.6.7 already.)pygame
dependencies. (Added in 2.6.8 already.)setuptools
, tomli
, and tomllib
for the incremental
package.IPython
when used by the rich
package vendored within pip
.ipywidgets
as equivalent to using IPython
.assert_raises
within Nuitka’s numpy.testing
stub.Organizational
--edit
option to find modules within .app
bundles created on macOS. (Added in 2.6.1 already.)global_replacements
result values, similar to existing checks for replacements
.global_replacements_re
and replacements_re
result values are valid regular expressions.clang-format-21
if available and applied formatting changes specific to this newer version.pylint
warnings related to setuptools
usage when running with Python 3.12+.INSTALLER
metadata for Conda packages in this scenario, making reliable detection of Conda packages impossible.--macos-target-arch
in favor of the standard --target-arch
option, with plans for eventual removal.setuptools
version during osc
uploads.pip install
and sometimes failing, potentially breaking Nuitka installation.Tests
NUITKA_EXTRA_OPTIONS
environment variable for distutils
test cases involving pyproject.toml
.gi
package, as it’s better covered by Nuitka-Watch and prone to failures in CI due to lack of an X11 display.--python-flag=safe_path
.retry
mechanism for pipenv
installation within the nuitka-watch
tool.nuitka-watch
tool.Cleanups
--module=package
where appropriate, instead of manually adding package contents, resulting in more conventional Nuitka command lines..pyi
file creation into a dedicated function, simplifying the post-processing code.Summary