Installation

NeuroM requires Python version 3.6 or higher, and uses MorphIO library to read morphologies. It is recommended that you use pip to install NeuroM into a virtualenv. For details, see Virtualenv setup.

Once the virtualenv is set up, there are three ways to install NeuroM:

  1. From the official Python Package Index server (PyPI)

  2. From the git repository

  3. From source (for NeuroM developers)

Note

In following code samples, the prompts (nrm)$ and $ are used to indicate that the user virtualenv is activated or deactivated respectively.

Virtualenv setup

$ python3 -mvenv nrm           # creates a virtualenv called "nrm" in the current directory
$ source nrm/bin/activate  # activates the "nrm" virtualenv
(nrm)$                     # now we are in the nrm virtualenv

Upgrade the pip version as shown below:

(nrm)$ pip install --upgrade pip   # Install newest pip inside virtualenv if version too old.

To de-activate the virtualenv run the deactivate command:

(nrm)$ deactivate

Note that you do not have to work in the nrm directory. This is where python packages will get installed, but you can work anywhere on your file system, as long as you have activated the virtualenv.

Installation options

Install from the official PyPI server

Install the latest release:

(nrm)$ pip install neurom

Install a specific version:

(nrm)$ pip install neurom==1.2.3

Install with plotly extra for better graphics display:

(nrm)$ pip install neurom[plotly]

Install from git

Install a particular release:

(nrm)$ pip install git+https://github.com/BlueBrain/NeuroM.git@v0.1.0

Install the latest version:

(nrm)$ pip install git+https://github.com/BlueBrain/NeuroM.git

Install from source

Clone the repository and install it:

(nrm)$ git clone https://github.com/BlueBrain/NeuroM.git
(nrm)$ pip install -e ./NeuroM

This installs NeuroM into your virtualenv in “editable” mode. That means that changes made to the source code after the installation procedure are seen by the installed package. To install in read-only mode, omit the -e.