Installing NESTML

Please note that only Python 3.8 (and later versions) are supported. The instructions below assume that python is aliased to or refers to python3, and pip to pip3.

Installing the latest release from PyPI

The easiest way to install NESTML is to use the Python Package Index (PyPI). This requires the Python package management system pip to be installed. In Ubuntu, Mint and Debian Linux you can install pip as follows:

sudo apt install python3-pip

NESTML can then be installed into your local user directory via:

pip install nestml

Installing the latest release from PPA (Linux)

NESTML can be installed via the apt package manager. This requires superuser (sudo) access. First, add the NEST PPA:

sudo add-apt-repository ppa:nest-simulator/nest

Then update the index and install the necessary packages:

sudo apt update
sudo apt install nest python3-nestml
python3 -m pip install --upgrade odetoolbox pygsl antlr4-python3-runtime==4.10

Before running NEST or NESTML, make sure the correct environment variables are set by running the following command:

source /usr/bin/

Installing the latest development version from GitHub

To obtain the latest development version, clone directly from the master branch of the GitHub repository:

git clone

Install into your local user directory using:

cd nestml
python install --user


When using the latest development version, you may also need the development version of ODE-toolbox. It can be installed by running:

pip install git+


After installation, correct operation can be tested by:

python test

Anaconda installation

In preparation, create a conda environment with NEST, and install some additional dependencies.

Please make sure to have the latest conda version installed and to create a new environment with the command below, i.e. installing all packages together at the start versus installing one by one.

conda create --name wnestml
conda activate wnestml
conda install -c conda-forge nest-simulator ipython cxx-compiler pyqt wxpython boost boost-cpp libboost cmake make
pip install nestml

Test the path to c++:

which c++
# '/home/graber/miniconda3/envs/wnestml/bin/c++'

Edit nest-config and correct the entry under --compiler with the output returned by which c++:

nano /home/graber/miniconda3/envs/wnestml/bin/nest-config

macOS users must in addition replace the -fopenmp=libomp entries with -Xclang -fopenmp under both --cflags and --libs in the nest-config.

Now set the correct paths and start ipython:

export PYTHONPATH=$PYTHONPATH:/home/graber/miniconda3/envs/wnestml/lib/python3.7/site-packages
export LD_LIBRARY_PATH=/tmp/nestml-component

The corresponding paths in ipython are:

from pynestml.frontend.pynestml_frontend import generate_nest_target

Docker installation

NESTML is installed as part of the official NEST Simulator Docker image.

For detailed instructions, please see