pola-rs/polars · error · ImportError

could not find Polars' Rust module

Error message

could not find Polars' Rust module

What it means

Terminal failure in the _plr bootstrap: every registered Polars binary variant (_polars compat/64/32) either failed to import (ImportError) or was skipped due to a version mismatch with the Python package, so no usable Rust extension module could be located — typically a broken or partial install.

Solutions

  1. The compiled Rust module is missing; reinstall polars (pip install -U --force-reinstall polars) and verify the platform is supported.

Example fix

pip install -U --force-reinstall polars
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Import of polars found no loadable Rust extension module.

Common situations: See trigger scenarios.


AI-assisted analysis of pola-rs/polars@5d8ebabf11 (2026-08-19). Data as JSON: /api/errors/725e9274975a46b6. Report an issue: GitHub.

Appendix: source

Thrown at py-polars/src/polars/_plr.py:98

                if sys.modules[__name__].__version__ != PKG_VERSION:
                    import warnings

                    version_warnings += [sys.modules[__name__].__version__]
                    warnings.warn(
                        f"Skipping Polars' Rust module version '{sys.modules[__name__].__version__}' did not match version of Python package '{PKG_VERSION}'.",
                        ImportWarning,
                        stacklevel=2,
                    )
                    continue

                break
            except ImportError:
                pass
        else:
            msg = "could not find Polars' Rust module"
            if len(version_warnings) > 0:
                msg += f". Skipped versions {version_warnings} which don't match Python package version"
            raise ImportError(msg)


# The version at the top here should match the version specified by the PLR.
assert sys.modules[__name__].__version__ == PKG_VERSION

View on GitHub (pinned to 5d8ebabf11)