question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 3 years ago
  • Comments:56 (56 by maintainers)

github_iconTop GitHub Comments

1reaction
hoechenbergercommented, Jul 8, 2020

@SophieHerbst it would be great if you could let us know how the revised installation instructions work for you, your students, and your colleagues!

1reaction
drammockcommented, Jul 6, 2020

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).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Install via pip or conda — MNE 1.2.2 documentation
If the Spyder console can not start because spyder-kernels is missing, install the required version in the mne environment with the following ...
Read more >
errors with spyder in anaconda after installing mne python
Dear all, I'm not sure if this is relevant for this mailing list but I'm having a weird error with anaconda/mne installation. ImportError:...
Read more >
Installing Spyder in a conda environment - Stack Overflow
Edit: Spyder is now available for Python 3.10. However, the default anaconda channel is not up to date with the latest Spyder release/version....
Read more >
Troubleshooting — Anaconda documentation
I'm having trouble with the Anaconda installer on Windows. How can I debug my issue? Cannot get conda to run after installing; Recovering...
Read more >
conda install spyder stuck on solving environment - You.com
This problem might cause by using virtual environment, and in Anaconda, your spyder or Jupyter Notebook works in default root, but tensorflow is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found