Skip to content

Additional Python packages

Python is a language with an extensive ecosystem of additional packages that can be used for various things. Here we list some key packages which can be useful for doing modelling.

Due to the vast amount of packages available, and different packages using different versions, we strongly recommend working in a virtual environment. You can find more on that in the virtual environment page.

Installing additional packages

Additional package are typically installed using pip from the pypi.org repository. Simply run

pip install packagename

(with a relevant packagename) to install a package. It is also possible to install a bunch of packages using a requirements file (often named requirements.txt). To do this, run

pip install -r requirements.txt

If you want to save the packages you have installed to such a requirements file, you can run

pip freeze > requirments.txt

NumPy and SciPy

NumPy and SciPy are staples when it comes to scientific computing in Python. You can install them using pip:

pip install numpy scipy

SUND

The SUND (Simulation Using Nonlinear Dynamic models) package is a package for simulating ODE models inspired by the MATLAB package IQM. It features a simple syntax for writing the model, and is able to combine models in a modular way by exposing inputs/outputs between models. It is also possible to give inputs in the form of predefined activities, which can contain constant outputs as well as more complex piecewise or interpolated outputs.

The easiest way is to install the sund package using pip:

pip install https://isbgroup.eu/edu/assets/sund-1.0.4.tar.gz

It can then be used by importing the package sund:

import sund

AMICI

AMICI is a package for simulating ODE models specified in the SBML format. It is using C in the background, and is able to both simulate the model and do parameter estimation.

Installing AMICI

For installing AMICI, we refer to the official install instructions available here.