Installation¶
pkpdsim requires python >= 3.14 and is available from pypi. It is tested on Linux, macOS and Windows with python 3.14 and on Linux with python 3.15. It simulates with sbmlsim 0.15 (sbmlsim>=0.15.0,<0.16, installed with it); pkpdsim 0.4 is the version for models on sbmlsim 0.8.
With uv¶
uv is the recommended way to install the package. In a project it is added as a dependency:
Into an existing virtual environment it is installed through the pip interface of uv:
With pip¶
AMICI, the second simulator¶
The battery of the checks of a model compares its builds with AMICI when it is installed, see Battery of the builds. AMICI is the optional extra amici; it is built from source and compiles every model, so it needs a C++ compiler (cmake and ninja come with the extra):
Development version¶
The current state of the develop branch is installed directly from GitHub:
or, with pip,
To work on the repository itself, with the test and documentation tooling, see Development.
Dependencies¶
| package | used for |
|---|---|
| sbmlutils | the factory of the models (creators, units, compartments), the qualifiers of the annotations and the console |
| libroadrunner | the simulator, the initial values are selections of a roadrunner model |
libroadrunner ships binary wheels for Linux (x86_64), macOS and Windows. Its extension links against libpython: an interpreter which uv installs keeps libpython in its lib directory, where the loader of Linux does not look, and import roadrunner fails with libpython3.14.so.1.0: cannot open shared object file. Put the directory on the library search path, e.g. in a project managed by uv:
An interpreter of the system or of conda is not affected, nor are macOS and Windows. On python 3.15 the wheel of libroadrunner 2.11.0 takes the symbol __jit_debug_register_code from libpython, which only an interpreter built with the experimental JIT defines: the interpreters of uv are, others may not be (deadsnakes on Ubuntu is not), and import roadrunner fails with undefined symbol: __jit_debug_register_code (roadrunner#1406); use an interpreter of uv there.
Logging¶
pkpdsim does not configure logging; it logs to the loggers below the pkpdsim logger and leaves handlers, levels and formatting to the application.