GeNN  4.7.1
GPU enhanced Neuronal Networks (GeNN)

You can download GeNN either as a zip file of a stable release or a snapshot of the most recent stable version or the unstable development version using the Git version control system.

Downloading a release

Point your browser to and download a release from the list by clicking the relevant source code button. Note that GeNN is only distributed in the form of source code due to its code generation design. Binary distributions would not make sense in this framework and hence are not provided. After downloading continue to install GeNN as described in the Installing GeNN section below.

Obtaining a Git snapshot

If it is not yet installed on your system, download and install Git ( clone the GeNN repository from Github

git clone

The github url of GeNN in the command above can be copied from the HTTPS clone URL displayed on the GeNN Github page (

This will clone the entire repository, including all open branches. By default git will check out the master branch which contains the source version upon which the next release will be based. There are other branches in the repository that are used for specific development purposes and are opened and closed without warning.

An alternative to using git is to download the full content of GeNN sources by clicking on the "Download ZIP" button on the bottom right of the GeNN Github page (

Installing GeNN

Installing GeNN comprises a few simple steps to create the GeNN development environment:

While GeNN models are normally simulated using CUDA on NVIDIA GPUs, if you want to use GeNN on a machine without an NVIDIA GPU, you can skip steps v and vi and use GeNN in "CPU_ONLY" mode.

(i) If you have downloaded a zip file, unpack in a convenient location. Otherwise enter the directory where you downloaded the Git repository.

(ii) Add GeNN's "bin" directory to your path, e.g. if you are running Linux or Mac OS X and extracted/downloaded GeNN to $HOME/GeNN, then you can add:

export PATH=$PATH:$HOME/GeNN/bin

to your login script (e.g. .profile or .bashrc). If you are using WINDOWS, the path should be a windows path as it will be interpreted by the Visual C++ compiler cl, and environment variables are best set using SETX in a Windows cmd window. To do so, open a Windows cmd window by typing cmd in the search field of the start menu, followed by the enter key. In the cmd window type:

setx PATH "C:\Users\me\GeNN\bin;%PATH%"

where C:\Users\me\GeNN is the path to your GeNN directory.

(iv) Install the C++ compiler on the machine, if not already present. For Windows, download Microsoft Visual Studio Community Edition from When installing Visual Studio, one should select the 'Desktop development with C++' configuration and the 'Windows 8.1 SDK' and 'Windows Universal CRT' individual components. Mac users should download and set up Xcode from , Linux users should install the GNU compiler collection gcc and g++ from their Linux distribution repository, or alternatively from

(v) If your machine has a GPU and you haven't installed CUDA already, obtain a fresh installation of the NVIDIA CUDA toolkit from Again, be sure to pick CUDA and C++ compiler versions which are compatible with each other. The latest C++ compiler need not necessarily be compatible with the latest CUDA toolkit.

(vi) Set the CUDA_PATH variable if it is not already set by the system, by putting

export CUDA_PATH=/usr/local/cuda

in your login script (or, if CUDA is installed in a non-standard location, the appropriate path to the main CUDA directory). For most people, this will be done by the CUDA install script and the default value of /usr/local/cuda is fine. In Windows, usually CUDA_PATH is already set after installing the CUDA toolkit. If not, set this variable with:

setx CUDA_PATH C:\path\to\cuda

This normally completes the installation. Windows users must close and reopen their command window to ensure variables set using SETX are initialised.

If you are using GeNN in Windows, the Visual Studio development environment must be set up within every instance of the CMD.EXE command window used. One can open an instance of CMD.EXE with the development environment already set up by navigating to Start - All Programs - Microsoft Visual Studio - Visual Studio Tools - x64 Native Tools Command Prompt. You may also wish to create a shortcut for this tool on the desktop, for convenience.

Installing PyGeNN

Building PyGeNN is a little involved so we recommend installing a prebuilt binary wheel from our Releases page or direct from our build server.

Installing PyGeNN from binary wheels

  • Select a suitable wheel from the Releases page (all wheels are build for CUDA 10 except for on Mac OS which is built for CUDA 9). For example, if you have a Linux system with Python 3.7 you would pick pygenn-0.2.1-cp37-cp37m-linux_x86_64.whl. If you do not have CUDA installed, ignore the CUDA version and pick the wheel that otherwise matches your platform.
  • Install the wheel using pip:
    pip install pygenn-0.2.1-cp37-cp37m-linux_x86_64.whl

Installing PyGeNN from source on Linux or Mac OSX

  • Navigate to the GeNN directory and build a dynamic library version of GeNN, directly into the PyGeNN directory with:
    make DYNAMIC=1 LIBRARY_DIRECTORY=`pwd`/pygenn/genn_wrapper/
  • Build the Python extension with setup tools with:
    python develop

Installing PyGeNN from source on Windows

  • Ensure that you have at least Python 3.5 and Visual Studio 2015 installed (extensions for earlier versions of Python cannot be built using any versions of Visual Studio new enough to support C++11). If you are using Visual Studio 2019, you need at least Python 3.7.5. These instructions assume that the Anaconda platform was used to install Python, but it should be possible to install PyGeNN using suitable versions of Python installed in different way (please let us know if you suceed in doing so!)
  • This process requires a command prompt with the environment correctly configured for both Visual Studio and Anaconda. To create one, launch an "x64 Native Tools Command Prompt" from your chosen version of Visual Studio's start menu folder and activate your chosen version of Anaconda by running the activate.bat in its Scripts directory. For example, if your user is called "me" and Anaconda is installed in your home directory, you would run:
    c:\Users\Me\Anaconda3\Scripts\activate.bat c:\Users\Me\Anaconda3
  • From this command prompt, install SWIG using the conda install swig command.
  • Navigate to the GeNN directory and build GeNN as a dll with:
    msbuild genn.sln /t:Build /p:Configuration=Release_DLL
    (if you don't have CUDA installed, building the CUDA backend will fail but it should still build the CPU backend).
  • Copy the newly built DLLs into pygenn using:
    copy /Y lib\genn*Release_DLL.* pygenn\genn_wrapper
  • Build the Python extension with setup tools with
    python develop

Top | Next