Installation Guide

BrainSpace is available in Python and MATLAB.

Python installation

BrainSpace works on Python 3.5+, and probably with older versions of Python 3, although it is not tested.


To use BrainSpace, the following Python packages are required:

Nibabel is required for reading/writing Gifti surfaces. Matplotlib is only used for colormaps and we may remove this dependency in future releases.

Additional dependencies

To enable interactivity, some plotting functionality in IPython notebooks makes use of the panel package. PyQT is another dependency for background plotting. See PyVista for more on background plotting. The support of background rendering however is still experimental.


BrainSpace can be installed using pip:

pip install brainspace

Alternatively, you can install the package from Github as follows:

git clone
cd BrainSpace
python install

MATLAB installation

This toolbox has been tested with MATLAB versions R2018b, although we expect it to work with versions R2018a and newer. Operating systems used during testing were OSX Mojave (10.14.6) and Linux Xenial Xerus (16.04.6).

BrainSpace can be installed by downloading and unzipping the code from Github and running the following in MATLAB:


If you want to load BrainSpace every time you start MATLAB, type edit startup and append the above line to the end of this file.

You can move the MATLAB directory to other locations. However, the example data loader functions used in our tutorials require the MATLAB and shared directories to both be in the same directory.

If you wish to open gifti files (necessary for the tutorial) you will also need to install the gifti library.