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¶
Attention
As NESTML is currently getting close to its version 4.0 release, we recommend using the development version (see below under Installing the latest development version from GitHub).
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 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
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/")