INNER CODE UNIT · Python

_raise_r_load_error

briscverse/ryp · ryp.py:159

def _raise_r_load_error(load_error: OSError, R_home: str, rlib_path: str,
                        reason: str, soname: str | None,
                        process_glibc: tuple[int, ...] | None,
                        required_glibc: tuple[int, ...] | None = None) -> None:
    """
    Raise an actionable error after a dependency of libR could not be loaded on
    a non-Windows system. There are three cases, selected by `reason`. If the
    dependency requires a newer glibc than this process provides ('glibc'),
    that mismatch is the root cause and cannot be fixed from within ryp, since
    a process's glibc is fixed at startup. If the dependency resolves to a
    differently-named library ('needs_linker'), e.g. a conda libblas.so.3 whose
    real soname is libopenblas.so.0, only the dynamic linker searching its path
    by name can satisfy it, which an in-process preload cannot do. If no copy
    of the dependency was found at all ('not_found'), then R names a dependency
    that exists nowhere this Python (or R itself) can find it, which points to
    a broken or incomplete R installation. Always raises.
    Args:
        load_error: the original OSError from loading libR

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…