On this page
Installation
prusie 0.3.1 supports CPython 3.10 and newer (standard GIL builds). NumPy (>=1.26, <3) is the only required Python dependency for core model fitting. The computational core is compiled as a native Rust extension, so R is not needed.
PyPI
Install the latest release from PyPI:
pip install prusie
To use sparse input matrices, advanced RSS likelihoods, LD diagnostics, and plotting tools, install the optional analysis extra:
pip install 'prusie[analysis]'
Use a prebuilt wheel
Prebuilt cp310-abi3 wheels are compatible with CPython 3.10 through 3.15 (free-threaded 3.13t–3.15t builds are not currently supported). Because the compiled extension is bundled in the wheel, no Rust toolchain or C compiler is required.
You can download platform wheels directly from GitHub Release v0.3.1:
| Platform | Wheel filename |
|---|---|
| Linux x86-64, glibc ≥2.28 | prusie-0.3.1-cp310-abi3-manylinux_2_28_x86_64.whl |
| Linux ARM64, glibc ≥2.28 | prusie-0.3.1-cp310-abi3-manylinux_2_28_aarch64.whl |
| macOS Intel | prusie-0.3.1-cp310-abi3-macosx_10_12_x86_64.whl |
| macOS Apple silicon | prusie-0.3.1-cp310-abi3-macosx_11_0_arm64.whl |
| Windows x86-64 | prusie-0.3.1-cp310-abi3-win_amd64.whl |
To verify the download integrity against SHA256SUMS.txt before installing (shown here for Linux x86-64):
curl -fLO https://github.com/LucaJiang/prusie/releases/download/v0.3.1/prusie-0.3.1-cp310-abi3-manylinux_2_28_x86_64.whl
curl -fLO https://github.com/LucaJiang/prusie/releases/download/v0.3.1/SHA256SUMS.txt
sha256sum --check --ignore-missing SHA256SUMS.txt
pip install ./prusie-0.3.1-cp310-abi3-manylinux_2_28_x86_64.whl
On macOS, verify the hash with shasum -a 256 <wheel>; in Windows PowerShell, run Get-FileHash <wheel> -Algorithm SHA256. You can also install directly from the release URL:
pip install https://github.com/LucaJiang/prusie/releases/download/v0.3.1/prusie-0.3.1-cp310-abi3-manylinux_2_28_x86_64.whl
The Linux x86-64 wheel includes the libmvec vectorized exponential helper, whereas wheels for other platforms use scalar exponentials (equivalent to the portable-math feature).
Build from source
Building from source requires the Rust toolchain specified in rust-toolchain.toml (currently 1.98.1) and standard platform linker tools. If rustup is installed and cargo is on PATH, rustup will fetch the pinned toolchain automatically. On GNU/Linux x86-64, the default build also requires a C compiler and ar to compile the vector-math shim; external BLAS libraries are not required. pip handles the maturin build backend (pinned to 1.15.0 in pyproject.toml).
Clone the repository and install into your active Python environment:
git clone https://github.com/LucaJiang/prusie.git
cd prusie
git checkout v0.3.1 # optional: pin the released version
pip install .
To enforce the exact Cargo dependency versions recorded in Cargo.lock:
python -m pip install . --config-settings=build-args="--locked"
To build without the C vector-math helper, enable the portable-math Cargo feature:
python -m pip install . --config-settings=build-args="--locked --features portable-math"
Enabling portable-math uses scalar exponentials and keeps LD preparation single-threaded; see native threading and numerical reproducibility for details. Package-building commands for distribution are covered in Contributing.
Optional analysis tools
The analysis extra installs SciPy (>=1.11) and Matplotlib (>=3.7):
python -m pip install 'prusie[analysis]'
When building from a local checkout, replace . with '.[analysis]' in the pip install command above (and pass --features portable-math if needed).
SciPy powers sparse design matrices, LD diagnostics, RSS models with finite-reference or LD-mismatch corrections, multi-panel RSS, and prusie.susie_post_outcome_configuration. Matplotlib is used by the plotting routines in prusie.viz and the offline report generator in prusie.report. Both modules are imported lazily on demand; see the analysis and plotting API.
Run the installed example
Verify your installation by fitting the bundled synthetic dataset:
import prusie
example = prusie.load_example()
fit = prusie.susie_rss(**example["inputs"], **example["parameters"])
print("Version:", prusie.__version__)
print("Converged:", fit.converged, "IBSS sweeps:", fit.niter)
print("Maximum PIP:", fit.pip.max())
load_example() loads its data directly from the installed package without network access or optional dependencies. Continue to the quick-start tutorial to inspect the fitted credible sets and generate figures and reports.