ModuleNotFoundError: No module named ‘mne‘

When importing the mne library in jupyter notebook, an error message appears.

ModuleNotFoundError: No module named 'mne'

1. Kernel issues used by Jupyter Notebook:

  • Make sure that the kernel used in Jupyter Notebook pipcorresponds to your installed Python environment. Sometimes, Jupyter may use a different Python kernel, causing the library to not be found.

In Jupyter Notebook, the kernel can be inspected and changed via:

  • Open your notebook file in Jupyter Notebook.
  • Select "Kernel" > "Change Kernel" in the menu and make sure the correct kernel is selected.

2. Install the mne library into the Jupyter kernel:

In Jupyter Notebook, you can run the following command in a cell in the notebook:

!pip install mne

If you run it again, there will be no error.

import mne

Guess you like

Origin blog.csdn.net/gzy13477/article/details/134833990