Documentation

Installation

Install pyINLA and download the INLA binary for your platform.

Install the Python package

pip install pyinla

We recommend using a virtual environment (uv, conda, or venv) to keep dependencies isolated.

The INLA binary

pyINLA is a Python interface to the INLA C/C++ engine. The engine is distributed as a pre-compiled binary and must be downloaded separately after installing the Python package.

Automatic download: The binary is auto-detected and downloaded the first time you run a model, matched to your operating system and processor architecture.

Recommended: Download the binary explicitly before fitting models, especially in Jupyter notebooks or Docker containers, so any network issues are caught early.

Download the binary

Run this once after pip install pyinla:

import pyinla

# Auto-detect your platform and download
pyinla.download_binary()

pyINLA uses a built-in manifest (binaries.json) to select the correct bundle for your operating system and processor architecture. Each entry points at the newest engine release on GitHub, so an install always fetches the current build and there is no pinned version to go stale.

To force a re-download (e.g. to update to a newer version):

pyinla.download_binary(force=True)

Supported platforms: Linux x86-64, Linux arm64 (armv8.2 or newer), macOS Intel, macOS Apple Silicon, and Windows x86-64.

Browse available binaries See all builds on the upstream download server
from pyinla.binary import print_remote_binaries

# Show all available builds
print_remote_binaries()

# Filter by distro name
print_remote_binaries("ubuntu")

# Show only the latest version per distro
print_remote_binaries("ubuntu", latest_only=True)

The programmatic version returns a list of dicts:

rows = list_remote_binaries("ubuntu")
for r in rows:
    print(r["distro"], r["arch"], r["version"], r["url"])
Download from a specific URL Use a direct link from upstream or a custom build
from pyinla.binary import download_binary_from_url

download_binary_from_url("https://inla.r-inla-download.org/Linux-builds/...")

The URL is typically obtained from print_remote_binaries() or from the upstream website. The archive format (.tgz or .zip) is auto-detected.

Command-line tool pyinla-install
# Auto-detect platform and download
pyinla-install

# Force re-download
pyinla-install --force

# Show installed binary info
pyinla-install --info

# Browse the upstream download server
pyinla-install --remote
pyinla-install --remote ubuntu --latest

# Download from a specific URL
pyinla-install --url "https://..."

# Link an existing local binary
pyinla-install --link "/path/to/binary"
Troubleshooting Common issues and fixes

Wrong distro detected on Linux

Use print_remote_binaries() to find the correct URL, then download it directly:

from pyinla.binary import print_remote_binaries, download_binary_from_url
print_remote_binaries("rocky", latest_only=True)
download_binary_from_url("https://...", force=True)

Update to a newer version

Pass force=True to re-download:

pyinla.download_binary(force=True)

Architecture mismatch

pyINLA verifies the binary's ELF/PE header after download. If you see an architecture mismatch, use download_binary_from_url() with the correct URL for your platform.

Custom binary path

Use link_binary() (recommended) or set the INLA_BIN environment variable:

import os
os.environ["INLA_BIN"] = "/path/to/inla.mkl.run"
import pyinla

Check what is installed

from pyinla.binary import is_binary_installed, get_binary_version
print(is_binary_installed())   # True / False
print(get_binary_version())    # {'version': '26.05.10', ...}
Quick Reference All functions and CLI flags

Python API

FunctionDescription
pyinla.download_binary()Download binary (auto-detect platform and distro)
pyinla.download_binary(force=True)Force re-download (update to latest)
pyinla.list_available_binaries()Show the built-in manifest (bundled URLs)
pyinla.is_binary_installed()Check if a binary is installed

Additional functions available via from pyinla.binary import ...:

FunctionDescription
download_binary_from_url(url)Download from a specific URL
link_binary(path)Link an existing local binary
print_remote_binaries()Print all builds on the upstream download server
list_remote_binaries()Get the upstream listings as a list of dicts
get_binary_version()Get installed binary version info

CLI (pyinla-install)

CommandDescription
pyinla-installAuto-detect and download binary
pyinla-install --forceForce re-download
pyinla-install --infoShow installed version and manifest
pyinla-install --remote [FILTER]Browse the upstream download server
pyinla-install --remote FILTER --latestShow only latest version per distro
pyinla-install --url URLDownload from a specific URL
pyinla-install --link PATHLink an existing local binary

Changelog

Version history and updates for pyINLA.

v0.1.10 Latest September 2026

Opens control['compute']['smtp'] so the sTiles solver the shipped bundles are built with can actually be selected, drops pardiso from the public API, adds replicate and nrep to rw1 and rw2 for independent walks that share one precision, and restores the Intel macOS wheels that 0.1.9 shipped without.

v0.1.9 September 2026

Points the manifest at the upstream latest-release redirect so every install fetches the newest engine and no pinned tag can go stale, and ships the sTiles-enabled bundles by default with control['stiles'] opened.

v0.1.8 May 2026

Upgrades the engine to 26.05.10 on every supported platform apart from Ubuntu 25.04 and CentOS 7, where no native build exists upstream, routes Debian and RHEL family distros to the closest supported build by reading ID_LIKE from /etc/os-release, and rejects any download whose sha256 does not match the one recorded in binaries.json.

v0.1.7 May 2026

Hardens the safety layer with a cross-family control['family']['hyper'] uniformity check, widens link coverage so gaussian, beta and betabinomial take logit, log, cauchit and loga while nbinomial rejects quantile before the engine can crash on it, and emits the Expert, stiles and taucs sections of Model.ini in full.

v0.1.6 March 2026

Initial public release.

Next Steps