mne-python: Following the installation instructions for macOS yields an error message

Describe the bug

Following the installation instructions for macOS in the development version of the docs produces an error message, not a working MNE-Python installation

Steps to reproduce

Download the conda environment file from https://raw.githubusercontent.com/mne-tools/mne-python/master/environment.yml

Run

conda env create -f environment.yml -n mne-test

Expected results

A working environment should be created.

Actual results

Installation fails due to an unsatisfiable dependency:

Pip subprocess error:
ERROR: Could not find a version that satisfies the requirement vtk<8.2 (from -r /private/tmp/condaenv.fkd0fvyw.requirements.txt (line 4)) (from versions: 9.0.0, 9.0.1)
ERROR: No matching distribution found for vtk<8.2 (from -r /private/tmp/condaenv.fkd0fvyw.requirements.txt (line 4))


CondaEnvException: Pip failed

Additional information

This is due to the fact that python is pinned to >= 3.5 and vtk is pinned to < 8.2 on macOS. This will first install Python 3.8 (via conda) and bomb during pip install of vtk, because the only wheels available for Python 3.8 are for VTK 9.

VTK was pinned to version 8 on macOS because of some issues with version 9.

Since conda environment files do not support selectors, there are currently only 3 solutions to this problem:

  • fix the bugs that keep us from using VTK 9 on macOS
  • provide a separate environment file for macOS, which pins Python to < 3.8
  • suggest that users install the conda-forge package of MNE-Python, as the “clean” way to declare system-dependent requirements in conda land is by producing separate packages

cc @GuillaumeFavelier

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 22 (22 by maintainers)

Most upvoted comments

I’ll see if 9.0.1 changed anything for the better though.

@GuillaumeFavelier I can help with macOS testing of course! Right, the notebook example still shows a black image with VTK 9.0.1.

The simple example works for me, I’ll see if I can figure out how to make stc.plot work

can you try a very simple pyvista script @cbrnr ? The issue could totally be in the mne implementation.

import pyvista as pv
from pyvistaqt import BackgroundPlotter

p = BackgroundPlotter()
p.add_mesh(pv.Cone())

Expected result:

image

Already on it, about to make a CI PR