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 --pre nestml

NESTML pre-release

Currently, NESTML 5.0 is in pre-release or “release candidate” version status. This requires the flag --pre to be added when running pip (see pip documentation).

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 https://github.com/nest/nestml

Install into your local user directory using:

cd nestml
python setup.py install --user

Attention

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+https://github.com/nest/ode-toolbox

Testing

After installation, correct operation can be tested by:

python setup.py test

Anaconda installation

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

conda create --name wnestml
conda activate wnestml
conda install -c conda-forge nest-simulator ipython cxx-compiler pyqt wxpython
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

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
ipython

The corresponding paths in ipython are:

from pynestml.frontend.pynestml_frontend import to_nest, install_nest
to_nest(input_path="/home/graber/work/nestml/doc/tutorial/izhikevich_solution.nestml",
        target_path="/tmp/nestml-component",
        logging_level="INFO")
install_nest("/tmp/nestml-component", "/home/graber/miniconda3/envs/wnestml/")