-
Notifications
You must be signed in to change notification settings - Fork 124
/
installation.txt
172 lines (124 loc) · 6.33 KB
/
installation.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
============
Installation
============
The following instructions are for Linux and Mac OS X. It should be possible to
install and run PyNN on Windows, but this has not been tested.
Installing PyNN requires:
* Python (version 2.6, 2.7, 3.3 or 3.4)
* a recent version of the NumPy_ package
* the lazyarray_ package
* the Neo_ package
* at least one of the supported simulators: e.g. NEURON, NEST, or Brian.
Optional dependencies are:
* mpi4py_ (if you wish to run distributed simulations using MPI)
* either Jinja2_ or Cheetah_ (templating engines)
* the CSA_ library
Installing PyNN
===============
.. note:: if using NEURON, it is easiest if you install NEURON *before* you install PyNN (see below).
The easiest way to get PyNN is to use pip_::
$ pip install pyNN
If you are running Debian or Ubuntu, there are :doc:`binary packages <download>`
available. If you would prefer to install manually, :doc:`download the latest
source distribution <download>`, then run the setup script, e.g.::
$ tar xzf PyNN-0.8.0rc1.tar.gz
$ cd PyNN-0.8.0rc1
$ python setup.py install
This will install it to your Python :file:`site-packages` directory, and may
require root privileges. We strongly recommend, however, that you use a
virtualenv_ or a Conda_ environment. We assume you have already installed the
simulator(s) you wish to use it with. If this is not the case, see below for
installation instructions.
Test it using something like the following::
>>> import pyNN.nest as sim
>>> sim.setup()
>>> sim.end()
(This assumes you have NEST installed).
With NEURON as the simulator, make sure you install NEURON *before* you install PyNN.
The PyNN installation will then compile PyNN-specific membrane mechanisms, which are loaded when importing the :mod:`neuron` module::
>>> import pyNN.neuron as sim
NEURON -- Release 7.1 (359:7f113b76a94b) 2009-10-26
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2008
See http://www.neuron.yale.edu/credits.html
loading membrane mechanisms from /home/andrew/dev/pyNN/neuron/nmodl/i686/.libs/libnrnmech.so
Additional mechanisms from files
adexp.mod alphaisyn.mod alphasyn.mod expisyn.mod gsfa_grr.mod hh_traub.mod izikevich.mod
netstim2.mod refrac.mod reset.mod stdwa_guetig.mod stdwa_softlimits.mod stdwa_songabbott.mod
stdwa_symm.mod tmgsyn.mod tmisyn.mod tsodyksmarkram.mod vecstim.mod
If you installed PyNN before installing NEURON, or if you update your PyNN installation,
you will need to manually run :command:`nrnivmodl` in the :file:`pyNN/neuron/nmodl` directory.
Installing NEURON
=================
Download the sources for the latest release of NEURON, in ``.tar.gz`` format, from `<http://www.neuron.yale.edu/neuron/download/getstd>`_.
Also download Interviews from the same location.
Compile Interviews and NEURON according to the instructions given at `<http://www.neuron.yale.edu/neuron/static/download/compilestd_unix.html>`_,
except that when you run :command:`configure`, add the options :option:`--with-nrnpython` and, optionally, :option:`--with-paranrn`, i.e.::
$ ./configure --prefix=`pwd` --with-nrnpython --with-paranrn
$ make
$ make install
Make sure that you add the Interviews and NEURON :file:`bin` directories to your path.
Test that the Python support has been enabled by running::
$ nrniv -python
NEURON -- VERSION 7.3 ansi (1078:2b0c984183df) 2014-04-04
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2014
See http://www.neuron.yale.edu/neuron/credits
>>> import hoc
>>> import nrn
Now you can compile and install NEURON as a Python package::
$ cd src/nrnpython
$ python setup.py install
Now test everything worked::
$ python
>>> import neuron
NEURON -- VERSION 7.3 ansi (1078:2b0c984183df) 2014-04-04
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2014
See http://www.neuron.yale.edu/neuron/credits
If you run into problems, check out the `NEURON Forum`_.
Installing NEST and PyNEST
==========================
NEST 2.6 can be downloaded from `<http://www.nest-simulator.org/index.php/Software:Download>`_. Earlier versions of
NEST will not work with this version of PyNN.
The full installation instructions are available in the file INSTALL, which you can find in the NEST source package,
or at `<http://www.nest-simulator.org/index.php/Installation>`_.
.. note:: NumPy must be installed *before* installing NEST.
.. note:: Make sure you have the GNU Scientific Library (GSL) installed,
otherwise some PyNN standard models (e.g. :class:`IF_cond_exp`) will not be available.
On Linux, most Unix variants and Mac OS X, installation is usually as simple as::
$ ./configure --with-mpi
$ make
$ make install
This will install PyNEST to your Python :file:`site-packages` directory.
If you wish to install it elsewhere, see the full installation instructions.
Now try it out::
$ cd ~
$ python
>>> import nest
-- N E S T --
Copyright (C) 2004 The NEST Initiative
Version 2.6.0 Jan 6 2015 10:31:20
...
>>> nest.Models()
(u'ac_generator', u'aeif_cond_alpha', u'aeif_cond_alpha_RK5', u'aeif_cond_alpha_multisynapse',
...
Check that ``'aeif_cond_alpha'`` is in the list of models. If it is not, you may need to install a newer version of the `GNU Scientific Library`_ and then recompile NEST.
Installing Brian
================
Instructions for downloading and installing Brian_ are available from `<http://briansimulator.org/download/>`_.
Note that this version of PyNN works with Brian 1.4, but not with Brian 2.
.. _PyNN: http://neuralensemble.org/PyNN
.. _NumPy: http://www.numpy.org/
.. _lazyarray: https://pypi.python.org/pypi/lazyarray
.. _CSA: https://software.incf.org/software/csa/
.. _Jinja2: http://jinja.pocoo.org/
.. _Cheetah: http://www.cheetahtemplate.org/
.. _mpi4py: http://mpi4py.scipy.org/
.. _pip: http://www.pip-installer.org/
.. _PCSIM: http://www.lsm.tugraz.at/pcsim/
.. _Brian: http://briansimulator.org/
.. _`PyNN download page`: https://neuralensemble.org/trac/PyNN/wiki/Download
.. _`distutils`: http://docs.python.org/2/install/index.html
.. _`GNU Scientific Library`: http://www.gnu.org/software/gsl/
.. _`NEURON Forum`: http://www.neuron.yale.edu/phpBB/index.php
.. _Neo: http://neuralensemble.org/neo
.. _virtualenv: https://virtualenv.readthedocs.org/
.. _Conda: http://conda.pydata.org