Trouble installing Spyder into MNE conda environment
See original GitHub issue@SophieHerbst reported trouble getting Spyder to work in the MNE conda
environment which she created by following the official installation instructions on macOS.
I could reproduce the issue, which is essentially caused by the fact that our environment file creates a horrible mess by first installing PyQt via conda
(implicitly, as a dependency of other packages) and then again (explicitly) via pip
; this is expected to break.
A quick and super ugly workaround seems to be the following, which creates a working Spyder installation for me:
conda create -c defaults -n mne-spyder-test python=3.7 spyder
conda activate mne-spyder-test
curl --remote-name https://raw.githubusercontent.com/mne-tools/mne-python/master/environment.yml
conda env update -n mne-spyder-test -f environment.yml
conda remove --force pyqt
pip install -U "pyqt5>=5.10,<5.13"
pip install -U "pyqtwebengine>=5.10,<5.13"
The reason we’re installing PyQt5
(and packages that depend on it) via pip
seems to be that the latest version on the defaults
conda
channel is 5.9; yet we need at least version 5.10. I therefore propose we move away from the defaults
channel and switch to conda-forge
, from where we could get up-to-date releases of almost all of our dependencies. This would have avoided the recent VTK mess, too.
(Simply retrieving pyqt
from conda-forge
and installing the rest from defaults
is bound to produce problems; it’s discouraged to mix defaults
and conda-forge
packages in the same environment)
WDYT?
Issue Analytics
- State:
- Created 3 years ago
- Comments:56 (56 by maintainers)
Top GitHub Comments
@SophieHerbst it would be great if you could let us know how the revised installation instructions work for you, your students, and your colleagues!
Thanks for testing @cbrnr. I’ll open a PR with changes to the installation instructions that will hopefully make this all easier for everyone. (I’ll include your suggestion to have simpler
pip
instructions for users who don’t need 3D plotting).