How to use MNE in an already setup Conda envirnoment

I am trying to setup a project which reads EDF files, and for that I’ve decided to use mne. I also want to use pytorch, sklearn, and other packages in a single fresh conda environment so I could later easily contain the project in a docker container.

The problem is that most of the documentation has talked about creating new environments for MNE to work properly, and me using the conda commands I’ve linked here, has taken around 1 hour and I don’t think conda can solve the environment in any capacity.

Is there any advice about how to integrate mne in such a project? should I create a new environment for mne and switch between the two environments (this is needlessly complex and can introduce a lot of bugs imo).

  • MNE-Python version: Not installed yet. Plan to install the latest released version: 0.23.4.
  • operating system: Linux

Hello @FeryET and welcome to the forum!

The answer to your question really depends on what kind of functionality you need. The main reason the mne package on conda-forge has so many dependencies (and why we recommend installing it into a separate environment) is because the 3D plotting dependencies are not trivial to install correctly.

There’s been some work on an mne-base conda-forge package without this huge number of dependencies, but it’s not in a working state yet.

If you don’t need 3D plotting and simply want EDF reading, you could simply install MNE-Python via pip install mne (instead of using conda)

Best wishes,

1 Like