Skip to content

Installation

pkpdutils requires python >= 3.13 and is available from pypi. It is tested on Linux, macOS and Windows and is pure python; every dependency ships binary wheels, so no compiler is needed.

With uv

uv is the recommended way to install the package. In a project it is added as a dependency:

uv add pkpdutils

Into an existing virtual environment it is installed through the pip interface of uv:

uv venv --python 3.14
uv pip install pkpdutils

With pip

pip install pkpdutils

Development version

The current state of the develop branch is installed directly from GitHub:

uv add "pkpdutils @ git+https://github.com/matthiaskoenig/pkpdutils.git@develop"

or, with pip,

pip install git+https://github.com/matthiaskoenig/pkpdutils.git@develop

To work on the repository itself, with the test and documentation tooling, see Development.

Dependencies

package used for
numpy, scipy numerics, integration, regression, optimization and statistics
xarray, pandas timecourses and results as labeled arrays and tables
pint units and unit conversions
pydantic validated data structures and options
matplotlib figures
rich console output of scripts and examples

Logging

pkpdutils does not configure logging. It logs to loggers below the pkpdutils logger and leaves handlers, levels and formatting to the application:

import logging

logging.basicConfig(level=logging.INFO)
logging.getLogger("pkpdutils").setLevel(logging.WARNING)

For scripts and interactive work the rich output of the package can be turned on explicitly:

from pkpdutils import log

log.enable_rich_logging()