********** Installing ********** For the simplest experience, follow the :ref:`install-full`. For alternative ways of installing, see :ref:`install-custom`. For development installation instructions, see :ref:`development`. .. contents:: Contents :local: .. _install-full: Recommended 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: .. code-block:: bash $ 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): .. code-block:: bash (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 `_: .. code-block:: bash (eelbrain) $ jupyter lab .. SEEALSO:: 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): .. code-block:: bash (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: .. code-block:: bash (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. .. _install-custom: Alternative Installations ------------------------- Eelbrain can be installed as pre-compiled library from `conda-forge `_: .. code-block:: bash $ mamba install eelbrain or with `conda`: .. code-block:: bash $ conda install -c conda-forge eelbrain Alternatively, Eelbrain is also hosted on the Python Package Index (`PyPI `_), but installing from PyPI requires local compilation: .. code-block:: bash $ 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: .. code-block:: bash $ pip install eelbrain[brain] $ pip install eelbrain[gui] $ pip install eelbrain[full] .. SEEALSO:: For more installing options, including pre-releases, see the `wiki `_. 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.