The version described here is no longer supported.
Contents
- Ubuntu Linux Requirements
- Fedora Linux Requirements
- Mac OS X Requirements
- 32-bit Windows Requirements
- 64-bit Windows Requirements
- Windows PATH settings
- Standard Central Installation
- User-Only Installation
- Virtualenv Installation
- [C Development Environment] (#CDevelopment)
- Binary Compilation
- Configuration
- Running some examples
- Troubleshooting
Ubuntu Linux Requirements
- Install Python
sudo apt-get install python2.7
- Install numpy
sudo apt-get install python-numpy
- Install scipy
sudo apt-get install python-scipy
- Install lxml
sudo apt-get install python-lxml
- Install pip
sudo apt-get install python-pip
- Optional: Install matplotlib (often used in PyNN scripts for plotting graphs)
sudo apt-get install python-matplotlib
Continue to the Git Clone to install the remaining requirements.
Fedora Linux Requirements
- Install Python
sudo dnf install python
- Install numpy
sudo dnf install numpy
- Install scipy
sudo dnf install scipy
- Install lxml
sudo dnf install python-lxml
- Install pip
sudo dnf install python-pip
- Optional: Install matplotlib (often used in PyNN scripts for plotting graphs)
sudo dnf install python-matplotlib
Continue to the Git Clone to install the remaining requirements.
Mac OS X Requirements
- Download and install MacPorts
- Install python
sudo port install python27
sudo port select --set python python27
- Install numpy
sudo port install py27-numpy
- Install scipy
sudo port install py27-scipy
- Install lxml
sudo port install py27-lxml
- Install pip
sudo port install py27-pip
sudo port select --set pip pip27
- Optional: Install matplotlib (often used in PyNN scripts for plotting graphs)
sudo port install py27-matplotlib
Continue to the Git Clone to install the remaining requirements.
32-bit Windows Requirements
- Download and install Python
- Download and install numpy
- Download and install scipy
- Download and install lxml
- Download and install setuptools and [pip] (https://github.com/SpiNNakerManchester/github.SpiNNakerManchester.io/releases/download/v1.0-win32/pip-1.5.6.win32-py2.7.exe)
- Optional: Download and install matplotlib (often used in PyNN scripts for plotting graphs)
- Download and install dateutil, pyparsing, six and matplotlib
Continue to edit your PATH, before installing the remaining requirements.
64-bit Windows Requirements
- Download and install Python
- Download and install numpy
- Download and install scipy
- Download and install lxml
- Download and install setuptools and [pip] (https://github.com/SpiNNakerManchester/github.SpiNNakerManchester.io/releases/download/v1.0-win64/pip-1.5.6.win-amd64-py2.7.exe)
- Optional: Download and install matplotlib (often used in PyNN scripts for plotting graphs)
- Download and install dateutil, pyparsing, six and matplotlib
Continue to edit your PATH, before installing the remaining requirements.
Windows Path Settings
- Edit your PATH environment variable to include the Python27, Python27\Scripts and (if installed) gtk\bin directories.
- Go to “Control Panel”
- Go to “System” (may be under “System and Security”)
- Select “Advanced System Settings”
- Select “Environment Variables”
- Select the “Path” in the “System Variables” box at the bottom
- Click on “Edit”
- Add the new directory by putting it before the existing string, followed by a single semi-colon; if you installed the dependencies to the default/recommended locations, prepend Path with:
C:\Python27;C:\Python27\Scripts;
Continue to the Git Clone to install the remaining requirements.
Git Cloning Requirements
Central gitClone
You now need to clone the github resposorities for all the software stack. This requires you to run the following commands in a terminal, in the folder of your choice where the software will be installed.
git clone https://github.com/SpiNNakerManchester/sPyNNaker.git
cd sPyNNaker
sudo python setup.py develop --no-deps
cd ..
git clone https://github.com/SpiNNakerManchester/sPyNNakerExtraModelsPlugin.git
cd sPyNNakerExtraModelsPlugin
sudo python setup.py develop --no-deps
cd ..
git clone https://github.com/SpiNNakerManchester/SpiNNFrontEndCommon.git
cd SpiNNFrontEndCommon
sudo python setup.py develop --no-deps
cd ..
git clone https://github.com/SpiNNakerManchester/PACMAN.git
cd PACMAN
sudo python setup.py develop --no-deps
cd ..
git clone https://github.com/SpiNNakerManchester/SpiNNMan.git
cd SpiNNMan
sudo python setup.py develop --no-deps
cd ..
git clone https://github.com/SpiNNakerManchester/sPyNNakerExternalDevicesPlugin.git
cd sPyNNakerExternalDevicesPlugin
sudo python setup.py develop --no-deps
cd ..
git clone https://github.com/SpiNNakerManchester/DataSpecification.git
cd DataSpecification
sudo python setup.py develop --no-deps
cd ..
git clone https://github.com/SpiNNakerManchester/SpiNNMachine.git
cd SpiNNMachine
sudo python setup.py develop --no-deps
cd ..
git clone https://github.com/SpiNNakerManchester/SpiNNakerGraphFrontEnd.git
cd SpiNNakerGraphFrontEnd
sudo python setup.py develop --no-deps
cd ..
git clone https://github.com/SpiNNakerManchester/spinnaker_tools.git
git clone https://github.com/SpiNNakerManchester/spinn_common.git
git clone https://github.com/SpiNNakerManchester/ybug.git
git clone https://github.com/SpiNNakerManchester/Visualiser.git
git clone https://github.com/SpiNNakerManchester/PyNNExamples.git
sudo pip install enum34
sudo pip install six
sudo pip install pyNN==0.7.5
Continue to the C Compiler Install to install the remaining c compiler dependency
User-Only gitclone
You now need to clone the github resposorities for all the software stack. This requires you to run the following commands in a terminal, in the folder of your choice where the software will be installed.
git clone https://github.com/SpiNNakerManchester/sPyNNaker.git
cd sPyNNaker
python setup.py develop --no-deps --user
cd ..
git clone https://github.com/SpiNNakerManchester/sPyNNakerExtraModelsPlugin.git
cd sPyNNakerExtraModelsPlugin
python setup.py develop --no-deps --user
cd ..
git clone https://github.com/SpiNNakerManchester/SpiNNFrontEndCommon.git
cd SpiNNFrontEndCommon
python setup.py develop --no-deps --user
cd ..
git clone https://github.com/SpiNNakerManchester/PACMAN.git
cd PACMAN
python setup.py develop --no-deps --user
cd ..
git clone https://github.com/SpiNNakerManchester/SpiNNMan.git
cd SpiNNMan
python setup.py develop --no-deps --user
cd ..
git clone https://github.com/SpiNNakerManchester/sPyNNakerExternalDevicesPlugin.git
cd sPyNNakerExternalDevicesPlugin
python setup.py develop --no-deps --user
cd ..
git clone https://github.com/SpiNNakerManchester/DataSpecification.git
cd DataSpecification
python setup.py develop --no-deps --user
cd ..
git clone https://github.com/SpiNNakerManchester/SpiNNMachine.git
cd SpiNNMachine
python setup.py develop --no-deps --user
cd ..
git clone https://github.com/SpiNNakerManchester/SpiNNakerGraphFrontEnd.git
cd SpiNNakerGraphFrontEnd
python setup.py develop --no-deps --user
cd ..
git clone https://github.com/SpiNNakerManchester/spinnaker_tools.git
git clone https://github.com/SpiNNakerManchester/spinn_common.git
git clone https://github.com/SpiNNakerManchester/ybug.git
git clone https://github.com/SpiNNakerManchester/Visualiser.git
git clone https://github.com/SpiNNakerManchester/PyNNExamples.git
pip install enum34 --user
pip install six --user
pip install pyNN==0.7.5 --user
Continue to the C Compiler Install to install the remaining c compiler dependency
Virtualenv git clone
These instructions will install the required packages only in a virtualenv. Like the user-only installation, this can help when you don’t have root access or are on a shared machine. Additionally, it will help when you have several packages with conflicting dependencies, or those that occupy the same namespace (such as pyNN.spiNNaker if you have an older version of the toolchain).
If you already have installed sPyNNaker previously (and the optional sPyNNakerExtraDevicesPlugin and/or sPyNNakerExtraModelsPlugin), you will need to uninstall it:
- Activate your virtualenv,
<name>
source <name>/bin/activate
- Uninstall the existing tools
pip uninstall pyNN-SpiNNaker
pip uninstall sPyNNaker
pip uninstall sPyNNakerExternalDevicesPlugin
pip uninstall sPyNNakerExtraModelsPlugin
The installation of virtualenv and the linking to the external libraries is platform dependent.
- Ubuntu Virtualenv Installation
- 32-bit Fedora Virtualenv Installation
- 64-bit Fedora Virtualenv Installation
- Mac OS X Virtualenv Installation
- Windows Virtualenv Installation
Ubuntu Virtualenv Installation
- Install virtualenv
sudo pip install virtualenv
- Create a virtualenv;
<name>
in the following can be replaced by the name of your choice
virtualenv <name>
- Activate the virtualenv
source <name>/bin/activate
- Link numpy to the virtualenv
ln -s /usr/lib/python2.7/dist-packages/numpy* $VIRTUAL_ENV/lib/python2.7/site-packages/
- Link scipy to the virtualenv
ln -s /usr/lib/python2.7/dist-packages/scipy* $VIRTUAL_ENV/lib/python2.7/site-packages/
- Link lxml to the virtualenv
ln -s /usr/lib/python2.7/dist-packages/lxml* $VIRTUAL_ENV/lib/python2.7/site-packages/
- Optional: link matplotlib to the virtualenv and install dependencies (only if you chose to install matplotlib)
pip install python-dateutil
pip install pyparsing
pip install six
ln -s /usr/lib/pymodules/python2.7/matplotlib $VIRTUAL_ENV/lib/python2.7/site-packages/
ln -s /usr/lib/pymodules/python2.7/pylab.py $VIRTUAL_ENV/lib/python2.7/site-packages/
- go to Virtual git clone to compelte the cloning of the git reposorities
You can now configure your environment.
32-bit Fedora Virtualenv Installation
- Install virtualenv
sudo pip install virtualenv
- Create a virtualenv;
<name>
in the following can be replaced by the name of your choice
virtualenv <name>
- Activate the virtualenv
source <name>/bin/activate
- Link numpy to the virtualenv
ln -s /usr/lib/python2.7/site-packages/numpy* $VIRTUAL_ENV/lib/python2.7/site-packages/
- Link scipy to the virtualenv
ln -s /usr/lib/python2.7/site-packages/scipy* $VIRTUAL_ENV/lib/python2.7/site-packages/
- Link lxml to the virtualenv
ln -s /usr/lib/python2.7/site-packages/lxml* $VIRTUAL_ENV/lib/python2.7/site-packages/
- Optional: link matplotlib to the virtualenv and install dependencies (only if you chose to install matplotlib)
pip install python-dateutil
pip install pyparsing
pip install six
ln -s /usr/lib/python2.7/site-packages/matplotlib $VIRTUAL_ENV/lib/python2.7/site-packages/
ln -s /usr/lib/python2.7/site-packages/pylab.py $VIRTUAL_ENV/lib/python2.7/site-packages/
- go to Virtual git clone to compelte the cloning of the git reposorities
You can now configure your environment.
64-bit Fedora Virtualenv Installation
- Install virtualenv
sudo pip install virtualenv
- Create a virtualenv;
<name>
in the following can be replaced by the name of your choice
virtualenv <name>
- Activate the virtualenv
source <name>/bin/activate
- Link numpy to the virtualenv
ln -s /usr/lib64/python2.7/site-packages/numpy* $VIRTUAL_ENV/lib/python2.7/site-packages/
- Link scipy to the virtualenv
ln -s /usr/lib64/python2.7/site-packages/scipy* $VIRTUAL_ENV/lib/python2.7/site-packages/
- Link lxml to the virtualenv
ln -s /usr/lib64/python2.7/site-packages/lxml* $VIRTUAL_ENV/lib/python2.7/site-packages/
- Optional: link matplotlib to the virtualenv and install dependencies (only if you chose to install matplotlib)
pip install python-dateutil
pip install pyparsing
pip install six
ln -s /usr/lib64/python2.7/site-packages/matplotlib $VIRTUAL_ENV/lib/python2.7/site-packages/
ln -s /usr/lib64/python2.7/site-packages/pylab.py $VIRTUAL_ENV/lib/python2.7/site-packages/
- go to Virtual git clone to compelte the cloning of the git reposorities
You can now configure your environment.
Mac OS X Virtualenv Installation
- Install virtualenv
sudo pip install virtualenv
- Create a virtualenv;
<name>
in the following can be replaced by the name of your choice
virtualenv <name>
- Activate the virtualenv
source <name>/bin/activate
- Link numpy to the virtualenv
ln -s /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy* $VIRTUAL_ENV/lib/python2.7/site-packages/
- Link scipy to the virtualenv
ln -s /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy* $VIRTUAL_ENV/lib/python2.7/site-packages/
- Link lxml to the virtualenv
ln -s /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lxml* $VIRTUAL_ENV/lib/python2.7/site-packages/
- Optional: link matplotlib to the virtualenv and install dependencies (only if you chose to install matplotlib)
pip install python-dateutil
pip install pyparsing
pip install six
ln -s /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib $VIRTUAL_ENV/lib/python2.7/site-packages/
ln -s /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylab.py $VIRTUAL_ENV/lib/python2.7/site-packages/
- go to Virtual git clone to compelte the cloning of the git reposorities
You can now configure your environment.
Windows Virtualenv Installation
- Open a console as administrator and cd to your home directory
cd %HOMEPATH%
- Install virtualenv
pip install virtualenv
- Create a virtualenv;
<name>
in the following can be replaced by the name of your choice
virtualenv <name>
- Activate the virtualenv
<name>\Scripts\activate.bat
- Link numpy to the virtualenv
mklink /D %VIRTUAL_ENV%\Lib\site-packages\numpy C:\Python27\Lib\site-packages\numpy
mklink %VIRTUAL_ENV%\Lib\site-packages\numpy-1.9.1-py2.7.egg-info C:\Python27\site-packages\numpy-1.9.1-py2.7.egg-info
- Link scipy to the virtualenv
mklink /D %VIRTUAL_ENV%\Lib\site-packages\scipy C:\Python27\Lib\site-packages\scipy
mklink %VIRTUAL_ENV%\Lib\site-packages\scipy-0.14.1rc1-py2.7.egg-info C:\Python27\site-packages\scipy-0.14.1rc1-py2.7.egg-info
- Link lxml to the virtualenv
mklink /D %VIRTUAL_ENV%\Lib\site-packages\lxml C:\Python27\Lib\site-packages\lxml
mklink /D %VIRTUAL_ENV%\Lib\site-packages\lxml-3.4.1-py2.7.egg-info C:\Python27\site-packages\lxml-3.4.1-py2.7.egg-info
- Optional: link matplotlib to the virtualenv and install dependencies (only if you chose to install matplotlib)
pip install python-dateutil
pip install pyparsing
pip install six
mklink /D %VIRTUAL_ENV%\Lib\site-packages\matplotlib C:\Python27\Lib\site-packages\matplotlib
mklink %VIRTUAL_ENV%\Lib\site-packages\pylab.py C:\Python27\Lib\site-packages\pylab.py
- Optional: To make matplotlib work within a virtualenv, create the following environment variables:
TCL_LIBRARY: C:\Python27\tcl\tcl8.5
TK_LIBRARY: C:\Python27\tcl\tk8.5
- go to virtual git clone to compelte the cloning of the git reposorities
You can now configure your environment.
Virtual git clone
You now need to clone the github resposorities for all the software stack. This requires you to run the following commands in a terminal, in the folder of your choice where the software will be installed.
git clone https://github.com/SpiNNakerManchester/sPyNNaker.git
cd sPyNNaker
python setup.py develop --no-deps
cd ..
git clone https://github.com/SpiNNakerManchester/sPyNNakerExtraModelsPlugin.git
cd sPyNNakerExtraModelsPlugin
python setup.py develop --no-deps
cd ..
git clone https://github.com/SpiNNakerManchester/SpiNNFrontEndCommon.git
cd SpiNNFrontEndCommon
python setup.py develop --no-deps
cd ..
git clone https://github.com/SpiNNakerManchester/PACMAN.git
cd PACMAN
python setup.py develop --no-deps
cd ..
git clone https://github.com/SpiNNakerManchester/SpiNNMan.git
cd SpiNNMan
python setup.py develop --no-deps
cd ..
git clone https://github.com/SpiNNakerManchester/sPyNNakerExternalDevicesPlugin.git
cd sPyNNakerExternalDevicesPlugin
python setup.py develop --no-deps
cd ..
git clone https://github.com/SpiNNakerManchester/DataSpecification.git
cd DataSpecification
python setup.py develop --no-deps
cd ..
git clone https://github.com/SpiNNakerManchester/SpiNNMachine.git
cd SpiNNMachine
python setup.py develop --no-deps
cd ..
git clone https://github.com/SpiNNakerManchester/SpiNNakerGraphFrontEnd.git
cd SpiNNakerGraphFrontEnd
python setup.py develop --no-deps
cd ..
git clone https://github.com/SpiNNakerManchester/spinnaker_tools.git
git clone https://github.com/SpiNNakerManchester/spinn_common.git
git clone https://github.com/SpiNNakerManchester/ybug.git
git clone https://github.com/SpiNNakerManchester/Visualiser.git
git clone https://github.com/SpiNNakerManchester/PyNNExamples.git
pip install enum34
pip install six
pip install pyNN==0.7.5
Continue to the C Compiler Install to install the remaining c compiler dependency
C Development Environment
- Primarily, you will need to install a C compiler that is compatible with SpiNNaker. At present, we recommend using gcc for this. Instructions for installing this on your system are below, depending on which platform you are using, as well as instructions for installing Perl, which is used by the development tools to modify the generated binaries to run on SpiNNaker:
- Development Dependencies for 64-bit Ubuntu Linux
- Development Dependencies for 64-bit Fedora Linux
- Development Dependencies for 32-bit Ubuntu Linux
- Development Dependencies for 32-bit Fedora Linux
- Development Dependencies for Mac OS X
- Development Dependencies for Windows
Development Dependencies for 64-bit Ubuntu
- Install 32-bit libc
sudo apt-get install libc6-i386
- Install perl and dependencies
sudo apt-get install perl perl-tk libterm-readline-gnu-perl
- Follow the instructions for the Linux C Compiler
Development Dependencies for 64-bit Fedora
- Install 32-bit libc
sudo dnf install glibc.i686
- Install perl and dependencies
sudo dnf install perl perl-Tk perl-Term-ReadLine-Gnu
- Follow the instructions for the Linux C Compiler
Development Dependencies for 32-bit Ubuntu
- Install perl and dependencies
sudo apt-get install perl perl-tk libterm-readline-gnu-perl
- Follow the instructions for the Linux C Compiler
Development Dependencies for 32-bit Fedora
- Install perl and dependencies
sudo dnf install perl perl-Tk perl-Term-ReadLine-Gnu
- Follow the instructions for the Linux C Compiler
Linux C Compiler
- Download CodeSourcery GCC ARM EABI Compiler
- Extract the downloaded archive to the location of your choice
- Add the “bin” directory within the installed location to the PATH enviroment variable in .profile in your home directory e.g. append the following:
export PATH=$PATH:<install-location>/bin
where<install-location>
is the place where you extracted the file.
Development Dependencies for Mac OS X
- Install the arm-none-eabi toolchain
sudo port install arm-none-eabi-gcc
- Install perl and dependencies
sudo port install perl5 p5-tk p5-term-readline-gnu
- Optional: Install Xcode and all its development tools from here NOTE: take into account your Mac version.
Development Dependencies for Windows
- Download the prepackaged MinGW Environment
- Extract the downloaded archive to the location of your choice
- Create a shortcut to MinGW/msys/1.0/msys.bat and add it to your start menu
You can now use the msys.bat to start up an environment from in which you can compile C code for SpiNNaker.
SpiNNakerTools Installation
- Create an environment variable
SPINN_DIRS
that points at the location of the cloned https://github.com/SpiNNakerManchester/spinnaker_tools.git (note that in Windows, this should be the MinGW Posix path e.g. if you have extracted the archive to C:\SpiNNaker-Tools\, you should set the environment variable to /c/SpiNNaker-Tools). - Run
make
in the root directory of the extracted archive.
spinn_common Library Installation
The spinn_common library will be installed into the SpiNNaker Tools installation directory, as set up above.
- In the directory of the cloned https://github.com/SpiNNakerManchester/spinn_common.git, run
make
. - Run
make install
.
SpiNNFrontEndCommon Library Installation
The SpiNNFrontEndCommon library will be installed into the SpiNNaker Tools installation directory, as set up above.
- In the
c_common
directory of the cloned https://github.com/SpiNNakerManchester/SpiNNFrontEndCommon.git, runmake
. - Run
make install
.
YBug Installation
If you want to avoid having to run “source setup” in the ybug folder every time you log in or start a new terminal:
- Add the cloned ybug folder to your
PATH
environment variable - Add the cloned ybug folder to your
PERL5LIB
environment variable (or create this environment variable if it is not already set; note that in Windows, this should be the MinGW Posix path e.g. if you have extracted the archive to C:\ybug\, you should set the environment variable to /c/ybug) - If you are going to boot your board using ybug, create a new environment variable
YBUG_PATH
and set this to theboot
subdirectory of the extracted ybug folder.
To run ybug:
- If you haven’t added the environment variables detailed above, go into the directory where you extracted the archive and run:
source setup
- Run:
ybug <ip-or-host>
where<ip-or-host>
is the ip address or hostname of your SpiNNaker board. -
Type
help
to get further usage instructions. - Continue to the Compile Binaries to compelte the installation by compiling the binaries of the c code used by the tool chain.
Compile Binaries
To compile the c code used by the tool chain, run the following instructions from the base folder where all the software is installed:
cd spinnaker_tools
source setup
cd ..
cd spinn_common
make clean
make
make install
cd ..
cd SpiNNMan/c_models/reinjector/
make
cd ../../..
cd SpiNNFrontEndCommon/c_common/front_end_common_lib/
make install-clean
cd ..
make clean
make
make install
cd ../..
cd sPyNNaker/neural_modelling/
make clean
make
source setup
cd ../../SpiNNakerGraphFrontEnd/examples/
make clean
make
Continue to configure your environment.
Configuration
When SpyNNaker is first called, if a configuration file is not found, it will create one in your home directory and exit. It is possible to ask SpyNNaker to do this before you run your first simulation as follows:
python -c "import pyNN.spiNNaker"
Note that if you have previously installed a version of the spiNNaker software, you may already have a file called “.pacman.cfg” in your home directory. In this case, SpyNNaker will attempt to use this file for its paramters. If you don’t have this file, a new file called “.spynnaker.cfg” will be created in your home directory. You must edit this file to ensure that SpyNNaker can access your SpiNNaker machine. Upon opening this file, the part to alter will look like the following:
[Machine]
machineName = None
version = None
Within the file, you should set machineName
to the IP address or hostname of your SpiNNaker machine, and version
to the version of your SpiNNaker board; this will almost certainly be “3” for a 4-chip board or “5” on a 48-chip board.
The default ipaddress for a spinn-3 board is 192.168.240.253 and the default ipaddress for a spinn-5 board is 192.168.240.1
Network Configuration
Go to your network settings and set up your network adapter with the following settings:
1. ipaddress = 192.168.240.254
2. submask = 255.255.255.0
3. default gateway = 0.0.0.0
Running some examples
- Download the examples from here (zip) or here (tar.gz)
- Extract the archive
- Go to the “examples” folder
- Run:
python va_benchmark.py
- You will see the system go through a series of processes from partitioning, to placement, to routing and finally to loading and running.
- Once the example has finished, you should see a graph, that will look something like this:
If you get the output above, you have successfully installed your system.
Troubleshooting
- If you experience the error:
**UnicodeDecodeError: 'ascii' codec can't decode byte 0xb0 in position 1: ordinal not in range(128)**
Then to solve it, edit C:\Python27\Lib\mimetypes.py and add these codes:
if sys.getdefaultencoding() != 'gbk':
reload(sys)
sys.setdefaultencoding('gbk')
before the following line:
default_encoding = sys.getdefaultencoding()