I am having an issue with mne : from library.config

  • MNE version: using the online version I do not have the install on my computer
  • operating system: Windows 10

well I am new here I I have been using MNE for a month now and I have some issues with some libraries . I am working with google colab I have one demo in mne that I am trying to reproduce .my colob is connected to my drive and I have install MNE in colab
here is the error once I try to run it:
code : !python 01-anatomy.py
Traceback (most recent call last):
File “01-anatomy.py”, line 31, in
from library.config import study_path, subjects_dir, N_JOBS, spacing
File “/content/gdrive/MyDrive/mne-biomag-group-demo-master/scripts/processing/library/config.py”, line 17, in
user = os.environ[‘USER’]
File “/usr/lib/python3.7/os.py”, line 681, in getitem
raise KeyError(key) from None
KeyError: ‘USER’

here is the picture :

So I need your help please

Hello @Faidou and welcome to the forum!

The Biomag Demo scripts apparently expect an environment variable named USER to be set, see the config.py script:


You can set it in config.py e.g. by adding the line

os.environ['USER'] = 'Faidou'

after the import statements.

You may also wish to check out the MNE-BIDS-Pipeline as an alternative that is under active development.

Best wishes,


It worked
Thank you Richard