Error: The pymatreader module is needed, but it could not be imported

Hi guys, :wave:t2:

testing_data_folder = mne.datasets.testing.data_path()
eeglab_raw_file = os.path.join(testing_data_folder, 'EEGLAB', 'test_raw.set')

eeglab_raw =

When I write second code I get " For EEGLAB I/O to work, the pymatreader module is needed, but it could not be imported." error.

When I searched where the error came from, I couldn’t find anything, can someone help me? Thank you in advance :blush: :star_struck:

You need to install pymatreader (either with pip or conda, I don’t know what you are using).

1 Like

We should amend the error message to say HOW to install this thing. It’s not the first time this question came up, and maybe the current error message is too technical :thinking:


Thank you Mr. Brunner :blush:

now I get ValueError: Unknown mat file type, version 53, 44

when writing this code
eeglab_raw =

My file format is csv could this be the source of the error? Thank you in advance for your consideration

Hello @ipek,

read_raw_eeglab() is for use with EEGLAB .set / .fdt files, not for CSV files. Do you know how these files were produced? CSV is a more or less arbitrary format, so we cannot provide a straightforward way to read this. But if one know the structure of the data, one can (manually) import it anyway – it just requires more work.

For the data in the csv, is it epoch or contiguous signal?