ImportError when importing shiboken6.Shiboken in standalone build on Python 3.13
Bug Report
IMPORTANT: Please review the Issue Guidelines before submitting.
Bug Description
A very small standalone build using only shiboken6.Shiboken compiles successfully but fails with an ImportError at runtime.
The same script works correctly when executed with Python.
The issue reproduces with both:
- PySide6 6.11.0 / shiboken6 6.11.0
- PySide6 6.8.3 / shiboken6 6.8.3
Therefore this does not appear to be tied to a specific PySide6/shiboken6 release.
️ Environment
1. Nuitka Version, Python Version, OS, and Platform
4.2.2
Update status: up to date with stable release '4.2.2' (cached)
Commercial: None
Python: 3.13.15 (tags/v3.13.15:4061bc4, Aug 5 2026, 13:05:39) [MSC v.1944 64 bit (AMD64)]
Flavor: CPython Official
GIL: yes
Executable: <your venv python path>
OS: Windows
Arch: x86_64
WindowsRelease: 11
Version C compiler: zig.exe 0.16.02. How Nuitka and Python were Installed
Python:
- Official CPython 3.13.15
- Virtual Environment (venv)
Nuitka:
pip install nuitka3. Relevant PyPI Packages and Versions
Initially tested with:
Nuitka 4.2.2
PySide6 6.11.0
shiboken6 6.11.0Then retested with:
PySide6 6.8.3
shiboken6 6.8.3The issue reproduces identically in both environments.
️ To Reproduce
Hello World Test
A standalone "hello world" application compiles and runs correctly.
Example:
print("HELLO")Compiled executable works.
Therefore the issue appears specific to shiboken6.
SSCCE
test_shiboken.py
from shiboken6.Shiboken import *
print("SHIBOKEN_OK")Running with Python:
python test_shiboken.pyOutput:
SHIBOKEN_OKWorks correctly.
Nuitka Command Line
python -m nuitka ^
--remove-output ^
--standalone ^
test_shiboken.pyCompilation succeeds without warnings or errors.
Expected Behavior
Running:
test_shiboken.dist\test_shiboken.exeshould output:
SHIBOKEN_OKActual Behavior & Output
The executable fails immediately with:
Traceback (most recent call last):
File "test_shiboken.py", line 3, in <module>
File "shiboken6\__init__.py", line 27, in <module>
ImportErrorThe Python script itself runs successfully.
Only the Nuitka standalone executable fails.
↩️ Regression (if applicable)
Unknown.
I have not yet tested Python 3.12 due to environment restrictions on the machine.
Additional Context
Originally this was discovered while compiling a PySide6 desktop application.
The issue was reduced to the minimal reproducer shown above.
I found issue #2920 ("PySide6 fails to load shiboken.Shiboken6 with Python3.12"), which also involved shiboken6 imports and standalone compilation.
However, my issue reproduces using Python 3.13.15 and currently results in an ImportError rather than a crash.
The reproducer no longer depends on PySide6 modules and only imports:
from shiboken6.Shiboken import *which may help isolate the problem.
If there is additional diagnostic information I can provide, I would be happy to test it.
Source: Nuitka/Nuitka