How do I install mne on wsl2 in windows 11.

I have installed mne on wsl by installing miniconda and then following the linux installation instructions. My problem comes with visuaizations, I just don’t know how to set it up.

When I try to install the dependencies for a linux headless server:
conda install -c conda-forge "vtk>=9.2=*osmesa*" "mesalib=21.2.5"

I get this errors:


LibMambaUnsatisfiableError: Encountered problems while solving:
  - package xorg-libx11-1.8.9-hb711507_1 requires libxcb >=1.16,<1.17.0a0, but none of the providers can be installed

But are they even needed?
What is the correct procedure to use mne on wsl? I could not find any information about it.

sys_info()

Platform             Linux-5.15.133.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
Python               3.12.5 | packaged by conda-forge | (main, Aug  8 2024, 18:36:51) [GCC 12.4.0]
Executable           /home/edoardo/miniconda3/envs/mne/bin/python
CPU                  x86_64 (8 cores)
Memory               7.6 GB

Core
β”œβ˜‘ mne               1.8.0 (latest release)
β”œβ˜‘ numpy             1.26.4 (OpenBLAS 0.3.27 with 8 threads)
β”œβ˜‘ scipy             1.14.1
β””β˜‘ matplotlib        3.9.2 (backend=module://matplotlib_inline.backend_inline)

Numerical (optional)
β”œβ˜‘ sklearn           1.5.1
β”œβ˜‘ numba             0.60.0
β”œβ˜‘ nibabel           5.2.1
β”œβ˜‘ nilearn           0.10.4
β”œβ˜‘ dipy              1.9.0
β”œβ˜‘ openmeeg          2.5.12
β”œβ˜‘ pandas            2.2.2
β”œβ˜‘ h5io              0.2.4
β”œβ˜‘ h5py              3.11.0
β””β˜ unavailable       cupy

Visualization (optional)
β”œβ˜‘ pyvista           0.44.1 (OpenGL 4.5 (Core Profile) Mesa 24.2.1 via llvmpipe (LLVM 18.1.8, 256 bits))
β”œβ˜‘ pyvistaqt         0.11.1
β”œβ˜‘ vtk               9.3.1
β”œβ˜‘ qtpy              2.4.1

Hello,

Have you been able to run any MNE code?

I have mne 1.7 working with wsl2 on a windows 11 computer. (I used the installer file – the 1Gb+ .sh file on the install page)

Regarding the first error, have you done a search for libxcb on your system? apt list libxcb1
should say [installed] if it is installed.

I’m not sure if this matters, but my line of qtpy 2.4.1 also says (PyQt5=5.15.8)

Thank you very much for your reply,

So in order, libxcb is installed.

I didn’t use the installer from the homepage but followed the instructions for conda, now I tried again with that installer and it actually messed up conda a bit because I think it is not supposed to be used when conda is already installed. It appears it is not a big issue but PyQt is always (None=None) also with the installation using the installer file. I tried to install pyqt from command line (conda install pyqt) and I get this dependencies error. I don’t know if it has to do with something wrong in conda or something else.

conda install pyqt
Channels:
 - conda-forge
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: | warning  libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE
failed

LibMambaUnsatisfiableError: Encountered problems while solving:
  - package qt6-main-6.7.2-h0f8cd61_1 requires pcre2 >=10.43,<10.44.0a0, but none of the providers can be installed

Could not solve for environment specs
The following packages are incompatible
β”œβ”€ graphviz 12.0.0**  is installable and it requires
β”‚  └─ libglib >=2.80.3,<3.0a0 , which requires
β”‚     └─ pcre2 >=10.44,<10.45.0a0 , which can be installed;
β”œβ”€ pin-2 is installable and it requires
β”‚  └─ python 3.12.* , which can be installed;
β”œβ”€ pyqt is installable with the potential options
β”‚  β”œβ”€ pyqt 5.15.9 would require
β”‚  β”‚  └─ qt-main >=5.15.8,<5.16.0a0  with the potential options
β”‚  β”‚     β”œβ”€ qt-main 5.15.8 would require
β”‚  β”‚     β”‚  β”œβ”€ alsa-lib >=1.2.8,<1.2.9.0a0 , which can be installed;
β”‚  β”‚     β”‚  └─ mysql-libs >=8.0.32,<8.1.0a0 , which can be installed;
β”‚  β”‚     β”œβ”€ qt-main 5.15.8 would require
β”‚  β”‚     β”‚  β”œβ”€ icu >=73.2,<74.0a0 , which can be installed;
β”‚  β”‚     β”‚  └─ mysql-libs >=8.3.0,<8.4.0a0 , which can be installed;
β”‚  β”‚     β”œβ”€ qt-main 5.15.8 would require
β”‚  β”‚     β”‚  β”œβ”€ icu >=73.2,<74.0a0 , which can be installed;
β”‚  β”‚     β”‚  └─ mysql-libs >=8.0.33,<8.1.0a0 , which can be installed;
β”‚  β”‚     └─ qt-main 5.15.8 would require
β”‚  β”‚        β”œβ”€ alsa-lib >=1.2.9,<1.2.10.0a0 , which can be installed;
β”‚  β”‚        └─ mysql-libs >=8.0.33,<8.1.0a0 , which can be installed;
β”‚  β”œβ”€ pyqt [4.11.4|5.12.3|5.6.0|5.9.2] would require
β”‚  β”‚  └─ python [2.7* |>=2.7,<2.8.0a0 ], which conflicts with any installable versions previously reported;
β”‚  β”œβ”€ pyqt 4.11.4 would require
β”‚  β”‚  └─ python 3.4* , which conflicts with any installable versions previously reported;
β”‚  β”œβ”€ pyqt [4.11.4|5.6.0] would require
β”‚  β”‚  └─ python [3.5* |>=3.5,<3.6.0a0 ], which conflicts with any installable versions previously reported;
β”‚  β”œβ”€ pyqt [4.11.4|5.6.0] would require
β”‚  β”‚  └─ python 3.6* , which conflicts with any installable versions previously reported;
β”‚  β”œβ”€ pyqt [5.12.3|5.15.4|5.15.7|5.6.0|5.9.2] would require
β”‚  β”‚  β”œβ”€ pyqtwebengine 5.12.1 py37he336c9b_5, which requires
β”‚  β”‚  β”‚  └─ python >=3.7,<3.8.0a0 , which conflicts with any installable versions previously reported;
β”‚  β”‚  └─ python >=3.7,<3.8.0a0 , which conflicts with any installable versions previously reported;
β”‚  β”œβ”€ pyqt [5.12.3|5.15.4|5.15.7|5.15.9] would require
β”‚  β”‚  └─ python >=3.10,<3.11.0a0 , which conflicts with any installable versions previously reported;
β”‚  β”œβ”€ pyqt [5.12.3|5.6.0|5.9.2] would require
β”‚  β”‚  └─ python >=3.6,<3.7.0a0 , which conflicts with any installable versions previously reported;
β”‚  β”œβ”€ pyqt [5.12.3|5.15.4|5.15.7|5.15.9] would require
β”‚  β”‚  └─ python >=3.8,<3.9.0a0 , which conflicts with any installable versions previously reported;
β”‚  β”œβ”€ pyqt [5.12.3|5.15.4|5.15.7|5.15.9] would require
β”‚  β”‚  └─ python >=3.9,<3.10.0a0 , which conflicts with any installable versions previously reported;
β”‚  └─ pyqt [5.15.7|5.15.9] would require
β”‚     └─ python >=3.11,<3.12.0a0 , which conflicts with any installable versions previously reported;
└─ qt6-main 6.7.2**  is not installable because there are no viable options
   β”œβ”€ qt6-main 6.7.2 would require
   β”‚  β”œβ”€ alsa-lib >=1.2.12,<1.3.0a0 , which conflicts with any installable versions previously reported;
   β”‚  └─ icu >=75.1,<76.0a0 , which conflicts with any installable versions previously reported;
   β”œβ”€ qt6-main 6.7.2 would require
   β”‚  └─ pcre2 >=10.43,<10.44.0a0 , which conflicts with any installable versions previously reported;
   └─ qt6-main 6.7.2 would require
      └─ mysql-libs >=9.0.1,<9.1.0a0 , which conflicts with any installable versions previously reported.

Did you simply install wsl2 and then install mne from that file and everything was working or did you perform additional steps?

Thank you very much in advance,