Installing

Basic Installation

Eelbrain can be installed as pre-compiled library from conda-forge:

$ mamba install eelbrain

or with conda:

$ conda install -c conda-forge eelbrain

Alternatively, Eelbrain is also hosted on the Python Package Index (PyPI), but installing from PyPI requires local compilation:

$ pip install eelbrain

The default PYPI installation omits optional dependencies required for using the GUIs and for creating PySurfer/Mayavi based anatomical plots. In order to install these dependencies as well, use one of:

$ pip install eelbrain[brain]
$ pip install eelbrain[gui]
$ pip install eelbrain[full]

See also

For more installing options, including pre-releases, see the wiki.

Full Setup

The recommended tool for deploying Eelbrain is the Mamba package manager:

  1. Install Mamba.

  2. Create an environment containing Eelbrain along with other libraries required for a project. An example environment is provided in the Alice repository’s environment.yml file:

$ mamba env create --file=https://github.com/Eelbrain/Alice/raw/main/environment.yml

By default, this new environment will be called eelbrain (as specified in the environment.yml file), and can be activated with the following command (note the change in the command line prefix):

(base) $ mamba activate eelbrain
(eelbrain) $

You will have to activate the environment every time you start a new shell session.

Eelbrain can then be used from this environment, for example through Jupyter Lab:

(eelbrain) $ jupyter lab

See also

Mamba is an extension of Conda. The Conda documentation provides more information on environments.

Updating

In an existing environment, Eelbrain can generally be updated with the following command (assuming the target environment is currently active):

(eelbrain) $ mamba update eelbrain

However, in complex environments this can lead to package conflicts (mamba will display an error message). In such cases it may be easier to just cerate a new environment.

The currently installed version can be displayed with the mamba list command:

(eelbrain) $ mamba list eelbrain
# packages in environment at ~/miniforge3/envs/test:
#
# Name                    Version                   Build  Channel
eelbrain                  0.39.11         py311h86e7398_0    conda-forge

Sometimes Mamba may run into difficulties while updating and it may be easier to create a new environment instead.

Making your analysis future-proof

Newer version of Eelbrain support files generated with previous versions. However, running the same code with different versions can lead to slightly different results. This does not just apply to Eelbrain, but equally to the libraries it relies on like NumPy and MNE-Python, and happens for example when underlying implementations change, which can lead to different rounding errors. These changes should be very small, but they can sometimes change a p-value slightly, so it might be undesirable when revisiting at a previously finished analysis. In order to be able to replicate results exactly in the future, it might be useful to keep a record of the environment with which the analysis was done.