This documentation is for a development version. Click here for the latest stable release (v1.1.0).
On a local machine not connected to a Loihi host,
you can use any version of Python
pip install nengo-loihi
pip will do its best to install
If anything goes wrong during this process,
it is likely related to installing NumPy.
Follow our NumPy install instructions,
then try again.
These steps will take you through setting up a Python environment for running NengoLoihi, as well as for running models using the NxSDK directly. We will use Miniconda to set up an isolated environment for running Loihi models.
To see if it is available, run
If conda is available, the conda version should be printed to the console.
If it is not available:
Ask your superhost administrator if conda is installed. If it is, you need to add the
bindirectory of the conda installation to your path.
Running this once will change your path for the current session. Adding it to a shell configuration file (e.g.,
~/.bashrc) will change your path for all future terminal sessions.
If conda is not installed, install Miniconda.
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh bash miniconda.sh
Follow the prompts to set up Miniconda as desired.
Create a new
conda create --name loihi python=3
Activate your new environment.
conda activate loihi
Sometimes the environment can have issues when first created. Before continuing, run
which pipand ensure that the path to
pipis in your conda environment.
You will need to run
conda activate loihievery time you log onto the superhost.
Install NumPy and Cython with conda.
conda install numpy cython
The NumPy provided by conda is usually faster than those installed by other means.
Copy the latest NxSDK release to your current directory.
The location of NxSDK may have changed. Refer to Intel’s documentation to be sure. The most recent release and NxSDK location are current as of November, 2021.
If you are logged into INRC:
cp /nfs/ncl/releases/1.0.0/nxsdk-1.0.0.tar.gz .
If you are setting up a non-INRC superhost:
scp <inrc-host>:/nfs/ncl/releases/1.0.0/nxsdk-1.0.0.tar.gz .
pip install nxsdk-1.0.0.tar.gz
pip install nengo-loihi
pipwill install other requirements like Nengo automatically.
Test that both packages installed correctly.
Start Python by running the
pythoncommand. If everything is installed correctly, you should be able to import
Python 3.8.5 (default, Sep 4 2020, 07:30:14) [GCC 7.3.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information. >>> import nxsdk >>> import nengo_loihi
If you plan to make changes to NengoLoihi,
you should perform a developer install.
All of the steps above are the same
with a developer install,
except that instead of doing
pip install nengo-loihi,
you should do
git clone https://github.com/nengo/nengo-loihi.git pip install -e nengo-loihi cd nengo-loihi pre-commit install