Introductory tutorial - downloading sample dataset doesn't work

MNE version 1.3.0 / Windows 10

Hi,

I installed MNE via the standard Windows installer. I’m trying to follow this tutorial my locally-run Jupyter notebook: Overview of MEG/EEG analysis with MNE-Python — MNE 1.3.1 documentation. It seems like MNE is properly installed because when I retrieve the MNE system info all looks fine.

But when trying to load the sample dataset, I get the error below. Seems like the sample dataset can not be downloaded, and that the function to download the data is not available.

How to resolve this?

Thx!

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
~\Anaconda3\lib\site-packages\mne\utils\check.py in _soft_import(name, purpose, strict)
    276     try:
--> 277         mod = importlib.import_module(name)
    278         return mod

~\Anaconda3\lib\importlib\__init__.py in import_module(name, package)
    126             level += 1
--> 127     return _bootstrap._gcd_import(name[level:], package, level)
    128 

~\Anaconda3\lib\importlib\_bootstrap.py in _gcd_import(name, package, level)

~\Anaconda3\lib\importlib\_bootstrap.py in _find_and_load(name, import_)

~\Anaconda3\lib\importlib\_bootstrap.py in _find_and_load_unlocked(name, import_)

ModuleNotFoundError: No module named 'pooch'

During handling of the above exception, another exception occurred:

RuntimeError                              Traceback (most recent call last)
<ipython-input-19-22ea803b1184> in <module>
----> 1 sample_data_folder = mne.datasets.sample.data_path()
      2 sample_data_raw_file = (sample_data_folder / 'MEG' / 'sample' /
      3                         'sample_audvis_filt-0-40_raw.fif')
      4 raw = mne.io.read_raw_fif(sample_data_raw_file)

<decorator-gen-535> in data_path(path, force_update, update_path, download, verbose)

~\Anaconda3\lib\site-packages\mne\datasets\sample\sample.py in data_path(path, force_update, update_path, download, verbose)
     22               verbose=None):  # noqa: D103
     23 
---> 24     return _download_mne_dataset(
     25         name='sample', processor='untar', path=path,
     26         force_update=force_update, update_path=update_path,

~\Anaconda3\lib\site-packages\mne\datasets\utils.py in _download_mne_dataset(name, processor, path, force_update, update_path, download, accept)
    161 
    162     # import pooch library for handling the dataset downloading
--> 163     pooch = _soft_import('pooch', 'dataset downloading', strict=True)
    164     dataset_params = MNE_DATASETS[name]
    165     dataset_params['dataset_name'] = name

~\Anaconda3\lib\site-packages\mne\utils\check.py in _soft_import(name, purpose, strict)
    279     except (ImportError, ModuleNotFoundError):
    280         if strict:
--> 281             raise RuntimeError(f'For {purpose} to work, the {name} module is '
    282                                'needed, but it could not be imported.')
    283         else:

RuntimeError: For dataset downloading to work, the pooch module is needed, but it could not be imported.

You can try pip install pooch in your terminal when in the mne conda environment. Or !pip install pooch in ipython (note the exclamation mark).

Although this should have been installed with your install.

–Jeff

As @jstout211 mentioned, pooch is missing but should indeed have been installed. Can you show the output of mne.sys_info()?

This indicates that you are actually not using the MNE version that was installed via our installers. So something is going wrong here.

1 Like