Installing CaliPy
Overview
CaliPy is pre‑alpha software. You can either
install the latest stable wheel from PyPI (recommended for users), or
clone the development branch from GitHub (recommended for contributors and bleeding‑edge features).
Requirements
Python ≥ 3.8 (3.11 tested) ⎯ 64‑bit only
PyTorch ≥ 2.2 with CPU or CUDA ⩾ 11.8
Pyro ≥ 1.9.0
Optional: JupyterLab or VS Code for the example notebooks.
Quick install (PyPI)
# create & activate a fresh environment (recommended)
mkdir ~/Desktop/calipy
cd ~/Desktop/calipy
python3 -m venv calipy_env
source calipy_env/bin/activate
# ... then install calipy-ppl
# (ppl = probabilistic programming language)
pip install calipy-ppl
That’s it! Verify the installation:
>>> import calipy
>>> print(calipy.__version__)
Bleeding‑edge install (GitHub)
(calipy) $ git clone https://github.com/atlasoptimization/calipy.git
(calipy) $ cd calipy
(calipy) $ pip install -e '.[dev,docs]'
The -e flag installs CaliPy in editable mode so local changes are
picked up immediately—handy when you extend the library.
Optional CUDA wheels
If you have an NVIDIA GPU:
Check your CUDA version with
nvidia-smi.Install the matching PyTorch wheel, e.g.
(calipy) $ pip install 'torch>=2.2+cu121' --index-url https://download.pytorch.org/whl/cu121
Re‑install CaliPy (same
pip install calipy[docs]).
Building the documentation locally
(calipy) $ cd calipy/docs
(calipy) $ make clean html # outputs to build/html/index.html
(calipy) $ open build/html/index.html # macOS; use xdg-open on Linux
Troubleshooting
Mismatched PyTorch/Pyro versions Make sure the Pyro release you pick supports your installed PyTorch.
CUDA libraries not found Install the matching CUDA toolkit for your PyTorch wheel, or fall back to the CPU wheel.
Next steps
Quick‑Start Tutorial – run your first bias‑plus‑noise example
Core Concepts & Architecture – core abstractions & design philosophy
Usage – how to build models, effects, data wrappers, inference