Note I am in Ubuntu 16/Python 3.7/Conda 4.5.11. If you are on Windows, don't even bother. Just install Linux.
1. Create/activate your nest environment
conda create --name nest2. Install system packages you will need
conda activate nest
Note this is for the 'standard' configuration as described at http://www.nest-simulator.org/installation/.
sudo apt-get install -y build-essential cmake \
libltdl7-dev libreadline6-dev libncurses5-dev \
libgsl0-dev openmpi-bin libopenmpi-dev
3. Install python packages
conda install numpy scipy matplotlib ipython nose cython scikit-learn
4. Install NEST proper (see http://www.nest-simulator.org/installation/)
Obviously you can use whatever directory structure you want, but I put my
build in /opt/nest, so change your values below accordingly if you want something else.
a. Create folder /opt/nest and give yourself ownership if needed (I had to use sudo chown)
b. Download NEST (I put the tarball in /opt/nest)
c. Unpack the tarball (in /opt/nest):
tar -xzvf nest-simulator-2.16.0.tar.gz
d. Create a build directory (again, within opt/nest/):
e cd to the build directory:
f. Run cmake to build makefiles
Note the -Dwith-python=3 option, which forces it to use Python 3.
cmake -DCMAKE_INSTALL_PREFIX:PATH=/opt/nest/ /opt/nest/nest-simulator-2.16.0 -Dwith-python=3
I got some warnings ('Cannot generate a safe linker search path for target sli_readline ') but things seemed to work out ok.
g. Set environment variables
Add the following line to .bashrc:
5. Run the makefiles
make #this will take a few minutes(you may get some warnings)
make install #this goes quickly
make installcheck #takes a few miniutes, gives summary at end
6. Test something out
From your favorite IDE or command line, run a simple script (e.g., one_neuron.py in pynest/examples).
Things should just work. I like to use Spyder with conda, so added the following:
conda install spyder
spyder #so spyder runs from the nest environment
The one_neuron.py example worked just fine. Note, though, if you are using spyder, you will not want to run your code using F5 unless you are a fan of restarting your Python kernel constantly. To avoid problems, I recommend entering run filename.py in Spyder's (ipython) command line when ready to run a script.
7. Have fun!
Enjoy NEST, it is a really amazing neural simulation framework. I recommend starting here to learn how to program in pynest, the Python interface for the NEST simulator: http://www.nest-simulator.org/introduction-to-pynest/