mne.externals not found

Hi,

I would like to run a connectivity analysis on my data, but when I try to import the mne.connectivity module I keep getting the error:

No module named 'mne.externals'

I checked my mne version and it is the latest one. I am using Jupyter Notebook on a MacOS system.
How could I solve this?
Many thanks for any help you might provide!

mne.externals has been removed in recent versions of mne

you need to update your scripts.

Alex

1 Like

Thanks Alex, but I have the latest version of mne, so what do you mean with updating the script?

The module mne.externals was deprecated about 1.5 years ago, and removed in version 1.0. Thus all versions after 1.0 will not include it. You have 2 options:

Mathieu

1 Like

Thanks, that worked!

One thing I am also struggling with is the function:

mne_connectivity.viz.plot_sensors_connectivity

as when I call it, it does not recognize the input n_con and throws the following error:

plot_sensors_connectivity() got an unexpected keyword argument 'n_con'

Indeed, when I plot my connectivity matrix in sensors space, I see only a few correlation links displayed. As a matter of fact, they do not appear to be the ones displaying higher values, as in the connectivity matrix I can see larger ones. The number of links displayed seems to be casual…

thanks!

I’m going to guess you installed the stable 0.5.0 version of mne_connectivity. The function you are referring to does not have an argument n_con: mne_connectivity.viz.plot_sensors_connectivity β€” MNE-Connectivity 0.5.0 documentation

It does however have one in the dev 0.6.0 version: mne_connectivity.viz.plot_sensors_connectivity β€” MNE-Connectivity 0.6.0dev0 documentation

Mathieu

1 Like