Install and upgrade

Requirements

This package requires Python 3.11 or later (see Python support). It is continuously tested on Linux, and most parts should also work on other operating systems (MacOS, Windows).

I cannot use my system’s Python distribution, what now?

Several Python distributions can co-exist on a single system. If you don’t have access to a recent Python version via your system’s package manager (this might be the case for old operating systems), it is recommended to install the latest version of the Anaconda Python 3 distribution.

Also, there is the possibility to use multiple virtual environments via:

python3 -m virtualenv ENV_NAME
source ENV_NAME/bin/activate

where ENV_NAME denotes an individual environment name, if you do not want to mess up the system environment.

Install from PyPI

The package can be installed from the Python Package Index PyPI via pip:

pip3 install pypesto

Install from GitHub

If you want the bleeding edge version, install directly from GitHub:

pip3 install git+https://github.com/icb-dcm/pypesto.git@develop

If you need to have access to the source code, you can download it via:

git clone https://github.com/icb-dcm/pypesto.git

and then install from the local repository via:

cd pypesto
pip3 install .

Upgrade

If you want to upgrade from an existing previous version, replace install by ìnstall --upgrade in the above commands.

Install optional packages and external dependencies

  • pyPESTO includes multiple convenience methods to simplify parameter estimation for models generated using the toolbox AMICI. To use AMICI, install it via pip:

    pip3 install amici
    

    or, in case of problems, follow the full instructions from the AMICI documentation.

  • This package inherently supports optimization using the dlib toolbox. To use it, install dlib via:

    pip3 install dlib
    
  • All external dependencies can be installed through this shell script.

Install and run Docker container

We provide a pyPESTO OCI image through the Docker.io registry.

A docker image build is triggered on changes/commits in the develop branch of pyPESTO. The container is built and pushed via a GHA to the Docker.io registry with the tag corresponding to latest.

The image can be obtained by a pull from the Docker.io registry: docker pull docker.io/stephanmg/pypesto:latest

The Docker image can also be built locally using the Dockerfile found here: https://github.com/ICB-DCM/pyPESTO/tree/main/docker

If you require to transfer the docker image manually, build the container using the Dockerfile, then export your docker image to .tar by: docker save -o pypesto.tar pypesto:latest. The .tar file can then be transfered (e.g. with scp) to a remote location.

To run the pyPESTO container and print the current pyPESTO version: docker run --rm pypesto python3 -c 'import pypesto; print(f"pyPESTO version: {pypesto.__version__}")'.

Python support

We adopt the NEP 29 - Recommend Python and NumPy version support as a community policy standard. That means, we adopt a time window based policy for support of Python (and NumPy) versions.