how to use tutorials when mne is not installed in home directory?

External Email - Use Caution

Hi all,
Still working on my upgrade issue, but in the meantime, I have a question
about the sample data.
I'm trying the tutorial for source timec ourse visualization...
https://mne.tools/stable/auto_tutorials/source-modeling/plot_visualize_stc.html#sphx-glr-auto-tutorials-source-modeling-plot-visualize-stc-py
... but when I try
data_path = sample.data_path()
I get an error. It looks to me like it's looking for sample in my user
home directory, but I have mne installed in a shared directory. If I
understood better what the sample path should be, I could just create the
data path string. Or perhaps I don't have the sample data at all because
of the discrepancy between mne path and sample path?

Thanks for your help, see the error below.
Megan

data_path = sample.data_path()
Downloading archive MNE-sample-data-processed.tar.gz to
/na/homes/mschendel/mne_data
Downloading
https://files.osf.io/v1/resources/rxvq7/providers/osfstorage/59c0e26f9ad5a1025c4ab159?version=5&action=download&direct
(1.54 GB)
Error while fetching file https://osf.io/86qa2/download?version=5. Dataset
fetching aborted. ?B/s]

External Email - Use Caution

hi Megan,

you can install mne anywhere you like but when it downloads
data it tries to put them in your home directory by default.

see doc: https://mne.tools/stable/generated/mne.datasets.sample.data_path.html

you can specify what path you want.

HTH
Alex

External Email - Use Caution

Adding to what Alex said, you can configure globally where you want datasets to be stored (and where MNE-Python will look for them when loading the datasets) using the MNE_DATA config variable. For example:

mne.set_config('MNE_DATA', '/opt/data')

will cause datasets to be downloaded to /opt/data/MNE-sample-data, /opt/data/MNE-fnirs-motor-data, etc.

-- dan
Daniel McCloy
https://dan.mccloy.info
Research Scientist
Institute for Learning and Brain Sciences
University of Washington

??? Original Message ???

External Email - Use Caution

Hi all,
Thanks very much, Alex and Dan! That works.

Megan
MEG Technician
The Mind Research Network
1101 Yale Blvd. NE
Albuquerque, New Mexico 87106