{"record":{"id":"51186c2c1cf0db1c","repo":"slint-ui/slint","slug":"could-not-load-the-slint-dev-development-binary-error","errorCode":null,"errorMessage":"Could not load the slint-dev development binary: ${error}","messagePattern":"Could not load the slint-dev development binary: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"api/python/slint/slint/_native.py","lineNumber":61,"sourceCode":"        except importlib.metadata.PackageNotFoundError:\n            dev_version = None\n\n        if dev_version is not None:\n            own_version = importlib.metadata.version(\"slint\")\n            if dev_version != own_version:\n                warnings.warn(\n                    f\"Ignoring slint-dev {dev_version}: it does not match slint \"\n                    f\"{own_version}. Install slint-dev=={own_version} to enable the \"\n                    \"development binary with system-testing and MCP support.\",\n                    stacklevel=2,\n                )\n            else:\n                try:\n                    return importlib.import_module(\"slint_dev_native\")\n                except ImportError as error:\n                    # Installed, but its native binary is unavailable on this\n                    # platform. Fall back to the lean release binary.\n                    warnings.warn(\n                        f\"Could not load the slint-dev development binary: {error}\",\n                        stacklevel=2,\n                    )\n\n    from . import slint as native\n\n    return native\n\n\nif TYPE_CHECKING:\n    # Both binary variants expose the same surface, so type-check against the\n    # bundled extension's stub (slint.pyi).\n    from . import slint as native\nelse:\n    native = _load_native()\n","sourceCodeStart":43,"sourceCodeEnd":77,"githubUrl":"https://github.com/slint-ui/slint/blob/bb937076de3f7919766c1f25e2e969367cf77e9a/api/python/slint/slint/_native.py#L43-L77","documentation":"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.","triggerScenarios":"`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.","commonSituations":"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.","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"],"exampleFix":"// before (terminal)\n# slint-dev installed, but import fails on unsupported platform\n# after\npip uninstall slint-dev  # rely on the lean release binary","handlingStrategy":"fallback","validationCode":"try:\n    import slint_dev_native  # noqa\nexcept ImportError as e:\n    print(f\"slint-dev native unavailable: {e}; release binary will be used\")","typeGuard":null,"tryCatchPattern":"import warnings\nwith warnings.catch_warnings(record=True) as caught:\n    import slint\nnative_failed = any(\"slint-dev development binary\" in str(w.message) for w in caught)\nif native_failed:\n    # proceed with the lean release binary; no system-testing/MCP","preventionTips":["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"],"tags":["python","import-error","platform","fallback"],"backgroundTag":"unsupported-platform","analyzedSha":"bb937076de3f7919766c1f25e2e969367cf77e9a","analyzedAt":"2026-09-16T01:37:20.251Z","contentChangedAt":"2026-09-16T01:37:20.251Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}