slint-ui/slint · warning
Could not load the slint-dev development binary
Error message
Could not load the slint-dev development binary: ${error} What it means
This Python UserWarning from `_load_native` means the `slint-dev` package is installed and version-matched, but `importlib.import_module("slint_dev_native")` raised ImportError — its compiled native binary is unavailable on this platform. Slint then falls back to the lean release binary, so functionality continues without system-testing/MCP support.
Solutions
- Check `pip show slint-dev` and reinstall: `pip install --force-reinstall slint-dev`
- Verify a native wheel exists for your platform/Python version; if not, accept the fallback or remove slint-dev
- Check `python -c "import slint_dev_native"` to see the underlying ImportError detail
- Use an officially supported platform/Python combination
Example fix
// before (terminal) # slint-dev installed, but import fails on unsupported platform # after pip uninstall slint-dev # rely on the lean release binary
Defensive patterns
Strategy: fallback
Validate before calling
try:
import slint_dev_native # noqa
except ImportError as e:
print(f"slint-dev native unavailable: {e}; release binary will be used") Try / catch
import warnings
with warnings.catch_warnings(record=True) as caught:
import slint
native_failed = any("slint-dev development binary" in str(w.message) for w in caught)
if native_failed:
# proceed with the lean release binary; no system-testing/MCP Prevention
- Verify a native wheel exists for your platform and Python version before installing slint-dev
- Test `import slint_dev_native` after installation
- Keep Python on an officially supported version
- Force-reinstall the package if the wheel looks corrupted
When it happens
Trigger: `slint-dev` is installed at the matching version but `import slint_dev_native` fails because no prebuilt native wheel exists for the current platform/Python version, or the wheel is broken/incomplete.
Common situations: Running on an unsupported architecture (e.g. musl, aarch64 variants without wheels), a Python version newer than available dev wheels, corrupted installs, or missing shared-library dependencies on the system.
Understand the failure class
Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.
Related errors
- Callback ' ' cannot be used with a callback decorator for…
- Callback ' ' cannot be used with a callback decorator for…
- Callback ' ' in global ' ' cannot be used with a callback…
- Callback ' ' in global ' ' cannot be used with a callback…
- Could not compile
AI-assisted analysis of slint-ui/slint@bb937076de (2026-09-16).
Data as JSON: /api/errors/51186c2c1cf0db1c.
Report an issue: GitHub.
Appendix: source
Thrown at api/python/slint/slint/_native.py:61
except importlib.metadata.PackageNotFoundError:
dev_version = None
if dev_version is not None:
own_version = importlib.metadata.version("slint")
if dev_version != own_version:
warnings.warn(
f"Ignoring slint-dev {dev_version}: it does not match slint "
f"{own_version}. Install slint-dev=={own_version} to enable the "
"development binary with system-testing and MCP support.",
stacklevel=2,
)
else:
try:
return importlib.import_module("slint_dev_native")
except ImportError as error:
# Installed, but its native binary is unavailable on this
# platform. Fall back to the lean release binary.
warnings.warn(
f"Could not load the slint-dev development binary: {error}",
stacklevel=2,
)
from . import slint as native
return native
if TYPE_CHECKING:
# Both binary variants expose the same surface, so type-check against the
# bundled extension's stub (slint.pyi).
from . import slint as native
else:
native = _load_native()
View on GitHub (pinned to bb937076de)