"FileNotFoundError" occurs when running <mne.bem.make_watershed_bem>

import mne
mne.bem.make_watershed_bem('test',subjects_dir=subjects_dir)

When I create a bem using the file generated by freesurfer, I get the following error, my freesurfer is running under wsl and the code is running under window OS.

image

FileNotFoundError: [WinError 2] The system cannot find the specified file.

  • MNE version: 1.4.0
  • operating system: Windows 10

Hello, you need to run this Python code under WSL too, otherwise, the call to the FreeSurfer command will fail.

Best wishes,
Richard