Installation#

mne-icalabel requires Python 3.9 or higher.

Dependencies#

mne-icalabel works best with the latest stable release of MNE-Python. To ensure MNE-Python is up-to-date, see MNE installation instructions. mne-icalabel is available on Pypi and on conda-forge.

Methods#

As of MNE-Python 1.0, mne-icalabel is distributed in the MNE standalone installers.

The installers create a conda environment with the entire MNE-ecosystem setup, and more!

mne-icalabel is available on PyPI and can be installed in a given environment via pip.

pip install mne-icalabel

The ICLabel model requires either pytorch or Microsoft onnxruntime.

pip install torch
pip install onnxruntime

Note

If you are working with MEG data and plan to use the MEGnet model, e.g. mne_icalabel.megnet.megnet_label_components(), you must install onnxruntime, and do not need to install torch.

Additional dependencies can be installed with different keywords:

# GUI functionalities
pip install mne-icalabel[gui]

# MNE's ICA dependencies
pip install mne-icalabel[ica]

# developer dependencies
pip install mne-icalabel[doc,stubs,style,test]

# all of the above
pip install mne-icalabel[all]

Depending on your system, you may want to create a separate environment to install mne-icalabel. You can create a virtual environment with conda:

conda create -n myenv
conda activate myenv

Replace myenv with the environment name you prefer. mne-icalabel can then be installed from the conda-forge channel:

conda install -c conda-forge mne-icalabel

If you want to install a snapshot of the current development version, run:

pip install git+https://github.com/mne-tools/mne-icalabel

To check if everything worked fine, the following command should not raise any error messages:

mne_icalabel-sys_info