Installation
Requirements
Python 3.12 or later
uv (recommended) or pip
Installing with uv
# Core package (includes SymPy analytical-kernel support)
uv add OpenPKPD
# With the desktop GUI (Qt / PySide6 + matplotlib)
uv add "OpenPKPD[gui]"
# With diagnostic plots (requires matplotlib)
uv add "OpenPKPD[plots]"
# Full install — plots + optimagic
uv add "OpenPKPD[full]"
# Development install (tests, linting, docs)
uv sync --all-extras
# Development install focused on the symbolic-kernel path
uv sync --extra dev
Installing with pip
pip install OpenPKPD
pip install "OpenPKPD[gui]" # desktop GUI (PySide6 + matplotlib)
pip install "OpenPKPD[plots]" # with matplotlib
pip install "OpenPKPD[full]"
Optional extras
Extra |
Contents |
When to use |
|---|---|---|
|
|
Desktop GUI ( |
|
|
Diagnostic plots: GOF, PK, PD, ETA |
|
|
PyMC MCMC backend |
|
|
Unified optimizer interface |
|
compatibility alias |
Legacy extra name; SymPy is now part of the core install |
|
|
Interactive marimo notebooks |
|
|
Distributed cluster-parallel execution |
|
|
Optional Python-R bridge ( |
|
plots + optim |
General scientific extras without Bayesian or GUI packages |
|
Sphinx + RTD theme |
Building this documentation |
The R-backed external validation scripts use Rscript and the repo-local
.r-lib library tree directly. They do not require rpy2.
SymPy is a core dependency because the analytical-kernel generation and symbolic derivative path are now part of the explicit release validation lane.
Why Install An Extra?
Use the core install if you want the library, CLI, standard estimation paths, and the always-on symbolic analytical route. Add extras when you want a specific capability beyond that baseline:
Extra |
Main benefit |
Worth installing when |
Main tradeoff |
|---|---|---|---|
|
Desktop workflow, artifact browsing, interactive review |
You want to work through fits, diagnostics, and reports graphically |
Pulls in Qt / PySide6 and matplotlib |
|
Diagnostic and analysis plotting |
You want GOF, VPC, PK/PD, ETA, or simulation figures from Python/CLI workflows |
Adds matplotlib |
|
Faster ODE-heavy fitting and simulation |
You repeatedly fit or simulate |
Adds Numba/LLVM compatibility constraints |
|
PyMC-backed Bayesian inference |
You want a fuller MCMC backend than the built-in Laplace / native NUTS routes |
Larger probabilistic-programming stack |
|
Optimagic optimizer interface |
You want access to the broader optimizer surface and optimizer-specific controls |
Additional optimizer dependency surface |
|
Distributed execution |
You run large bootstrap/SSE/simulation jobs across multiple workers or machines |
Additional cluster runtime complexity |
|
Python-side R bridge |
You want to call R directly from Python via |
Adds |
|
Marimo notebook runtime |
You want interactive exploratory notebooks bundled with the repo |
Adds marimo and plotting runtime |
|
Installer creation |
You are building end-user installers or release artifacts |
Build-only tooling, not needed for normal use |
|
Documentation build tooling |
You are editing or publishing the docs |
Docs-only dependency set |
|
Common scientific extras in one install |
You want plots plus optimizer tooling without selecting extras one by one |
Still does not include GUI or Bayesian extras |
Practical rule of thumb:
use core only for scripting, CLI fits, and lightweight environments
add
jitfor ODE-heavy performance workadd
guifor interactive desktop useadd
bayeswhen Bayesian workflows are centraladd
fullwhen you want a convenient scientific-workbench install
Verifying the install
python -c "import openpkpd; print(openpkpd.__version__)"
openpkpd --help
Launching the desktop GUI
After installing the gui extra, start the desktop application with:
openpkpd-gui
From a source checkout, uv run openpkpd-gui also works.
If you are working from the repository checkout, just run-gui is also
available.
Building the documentation locally
just build-docs-html
# or: just build-docs-and-open
The repository justfile is intended to work across macOS, Linux, and Windows
for common contributor workflows.
If you are working on analytical PK derivative kernels or want the symbolic unit tests and cache-prewarm path active locally, run:
just run-tests-symbolic
just prewarm-symbolic-caches