Skip to content

Setting up MNE Python with Anaconda

Jussi Nurminen edited this page Oct 20, 2020 · 3 revisions

Andrey's procedure below may work, but I managed with the following:

  1. Install a mysterious Qt5 package:

sudo apt install libqt5x11extras5

  1. Install mne-python into 'mne' environment:

curl --remote-name https://raw.githubusercontent.com/mne-tools/mne-python/master/environment.yml
conda env create --name mne --file environment.yml

The reason why this works may be that mayavi installation needs some Qt5 development files, which are missing from a default Ubuntu 20.04 install.

Andrey:

MNE-Python installation with Anaconda (as described on MNE-Python page) is occasionally broken, at least, on Ubuntu 20.04. The following worked (at some time point) with a new Anaconda/Ubuntu 20.04 installation.

  1. Install 'vtk' in the 'base' environment:

conda activate base
conda install vtk

  1. Install mne-python into 'mne' environment:

curl --remote-name https://raw.githubusercontent.com/mne-tools/mne-python/master/environment.yml
conda env create --name mne --file environment.yml

  1. Install spyder into 'mne' environment:

conda activate mne
conda install spyder

  1. Downgrade PyQt5 to 5.10 in the 'mne' environment:

pip install PyQt5==5.10

  1. Install MNE with pip in the 'mne' environment:

pip install mne