GraphBrain is compatible with 64-bit CPython 3.3+ and runs on Linux, macOS and Windows(untested). GraphBrain is available over pip. Installation requires a working build environment. For both installation methods, check the prerequisites for your OS. Make sure you are using Python 3.

Install from the code repository (github)

Another way to install GraphBrain is to build it from the GitHub repository source. You should use this method if you wish to make changes to the code base.

Start by cloning the source code to your current local directory.

$ git clone
$ cd graphbrain

It is advisable to work with virtual environments, for reasons that are explained in the previous section. Please refer to it for details.

Install Cython:

$ pip install cython

Now we can build and install GraphBrain:

$ pip install .

It is still necessary to download a spaCy language model:

$ python -m spacy download en_core_web_lg

For developers

If you want to help develop GraphBrain, you should also install the development dependencies:

$ pip install '.[dev]'

Run tests

From the project’s root directory:

$ ./ test


Naturally, you can ignore the prerequisites that are already installed in your machine.


Linux distributions are diverse in terms of package managers. Please use the appropriate package manager for your distribution to install the prerequisites.

  • gcc
  • Python 3
  • pip (Python package manager)
  • virtualenv (Virtual Python Environment builder)


  • XCode and the “Command Line Tools”:

    $ xcode-select --install
  • The Homebrew package manager <>.

  • Python 3:

    $ brew install python3
  • pip (Python package manager):

    $ sudo easy_install pip
  • virtualenv (Virtual Python Environment builder):

    $ sudo -H pip install virtualenv
  • LevelDB (database engine):

    $ brew install leveldb


To be done…