Let’s get you started using Neon to build deep learning models!


Neon runs on Python 2.7 or Python 3.4+ and we support Linux and Mac OS X machines. Before install, please ensure you have recent versions of the following packages (different system names shown):

Ubuntu OSX Description
python-pip pip Tool to install python dependencies
python-virtualenv (*) virtualenv (*) Allows creation of isolated environments ((*): This is required only for Python 2.7 installs. With Python3: test for presence of venv with python3 -m venv -h)
libhdf5-dev h5py Enables loading of hdf5 formats
libyaml-dev pyaml Parses YAML format inputs
pkg-config pkg-config Retrieves information about installed libraries


To enable neon’s DataLoader, several optional libraries should be installed. For image processing, install OpenCV. For audio and video data, install ffmpeg. We recommend installing with a package manager (e.g. apt-get or homebrew).

Additionally, there are several other optional libraries.

  • To enable multi-threading operations on a CPU, install OpenBLAS, then recompile numpy with links to openBLAS (see sample instructions here). While Neon will run on the CPU, you’ll get far better performance using GPUs.
  • Enabling Neon to use GPUs requires installation of CUDA SDK and drivers. We support Pascal , Maxwell and Kepler GPU architectures, but our backend is optimized for Maxwell GPUs. Remember to add the CUDA path to your environment variables.

For GPU users, remember to add the CUDA path. For example, on Ubuntu:

export PATH="/usr/local/cuda/bin:"$PATH
export LD_LIBRARY_PATH="/usr/local/cuda/lib64:/usr/local/cuda/lib:/usr/local/lib:"$LD_LIBRARY_PATH

Or on Mac OS X:

export PATH="/usr/local/cuda/bin:"$PATH
export DYLD_LIBRARY_PATH="/usr/local/cuda/lib:"$DYLD_LIBRARY_PATH


We recommend installing Neon within a virtual environment to ensure a self-contained environment. To install neon within an already existing virtual environment, see the System-wide Install section. If you use the Anaconda python distribution, please see the Anaconda Install section. Otherwise, to setup neon in this manner, run the following commands:

git clone
cd neon; make

This will install the files in the neon/.venv/ directory and will use the python version in the default PATH. To instead force a Python2 or Python3 install, supply this as an optional parameter:

make python2


make python3

To activate the virtual environment, type

. .venv/bin/activate

You will see the prompt change to reflect the activated environment. To start Neon and run the MNIST multi-layer perceptron example (the “Hello World” of deep learning), enter


When you are finished, remember to deactivate the environment


Congratulations, you have installed neon! Next, we recommend you learn how to run models in neon and walk through the MNIST multilayer perceptron tutorial.

Virtual Environment

Virtualenv is a python tool that keeps the dependencies and packages required for different projects in separate environments. By default, our install creates a copy of python executable files in the neon/.venv directory. To learn more about virtual environments, see the guide at

System-wide install

If you would prefer not to use a new virtual environment, Neon can be installed system-wide with

git clone
cd neon && make sysinstall

To install neon in a previously existing virtual environment, first activate that environment, then run make sysinstall. Neon will install the dependencies in your virtual environment’s python folder.

Anaconda install

If you have already installed and configured the Anaconda distribution of python, follow the subsequent steps.

First, configure and activate a new conda environment for neon:

conda create --name neon pip
source activate neon

Now clone and run a system-wide install. Since the install takes place inside a conda environment, the dependencies will be installed in your environment folder.

git clone
cd neon && make sysinstall

When complete, deactivate the environment:

source deactivate


If you would prefer having a containerized installation of neon and its dependencies, the open source community has contributed the following Docker images (note that these are not supported/maintained by Nervana):


For any bugs or feature requests please:

  1. Search the open and closed issues list to see if we’re already working on what you have uncovered.
  2. Check that your issue/request isn’t answered in our Frequently Asked Questions (FAQ) or neon-users Google group.
  3. File a new issue or submit a new pull request if you have some code to contribute. See our contributing guide.
  4. For other questions and discussions please post a message to the neon-users Google group.