Skip to content

Commit

Permalink
Update conda installation docs (#1143)
Browse files Browse the repository at this point in the history
  • Loading branch information
pnbabu authored Dec 4, 2024
1 parent 8e9b564 commit 3f4cb50
Showing 1 changed file with 11 additions and 36 deletions.
47 changes: 11 additions & 36 deletions doc/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,51 +80,26 @@ After installation, correct operation can be tested by:
python setup.py test
Anaconda installation
---------------------

In preparation, `create a conda environment with NEST <https://nest-simulator.readthedocs.io/en/stable/installation/index.html>`_, and install some additional dependencies.
Installation with conda (with NEST simulator)
---------------------------------------------

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.

.. code-block:: bash
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++``:

.. code-block:: bash
which c++
# '/home/graber/miniconda3/envs/wnestml/bin/c++'
.. note::

Edit ``nest-config`` and correct the entry under ``--compiler`` with the output returned by ``which c++``:
We recommend using `miniforge <https://github.com/conda-forge/miniforge>`_ or `micromamba <https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html>`_ in place of Anaconda/miniconda as they have some advantages when installing in larger environments.

.. code-block:: bash
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``:

.. code-block:: bash
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:
conda create --name <env_name>
conda activate <env_name>
conda install -c conda-forge nest-simulator ipython cxx-compiler boost boost-cpp libboost cmake make
pip install nestml
.. code-block:: python
Alternatively, NEST can also be installed from source in a conda environment. The instructions can be found `here <https://nest-simulator.readthedocs.io/en/stable/installation/condaenv_install.html#condaenv>`_.

from pynestml.frontend.pynestml_frontend import generate_nest_target
generate_nest_target(input_path="/home/graber/work/nestml/doc/tutorial/izhikevich_solution.nestml",
target_path="/tmp/nestml-component",
logging_level="INFO")
After installing NESTML, the neuron and synapse models can be found in the path ``$HOME/miniforge3/envs/<env_name>/models`` and the tutorial notebooks can be found under ``$HOME/miniforge3/envs/<env_name>/doc/tutorials``.
For more information on how to run NESTML, please refer to `Running NESTML <https://nestml.readthedocs.io/en/latest/running/index.html>`_.


Docker installation
Expand Down

0 comments on commit 3f4cb50

Please sign in to comment.