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
pip
corresponds 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