Error when install MNE , no module found

Hi,
Kindly, iam new to MNE python. I install the package and tried to use it on Jupyter , but have error which is :
No module found ?
Please could you help !

That means your jupyter is not installed in the same virtual environment or that you did not install the jupyter kernel in the MNE environment.

If you are not familiar with environments, jupyter kernels and so on, you should use the MNE installers: MNE-Python installers — MNE 1.7.0 documentation

They create an entire conda environment with spyder and jupyter installed.

Mathieu

1 Like

I install MNE using
pip install MNE
and most of the python packages have no issue when used pip in ( cmd) .

when used : MNE installers: MNE-Python installers — MNE 1.7.0 documentation

its takes very long time and installation did not complete !!!

Hello, I’m sorry to hear you’re having trouble installing MNE. The installer may indeed take a very long time to complete without displaying any visible progress. In this case, just let it run in the background. On some computers, it may easily take 15 to 30 minutes to complete! Maybe let it run during lunch break or over night.

Good luck,
Richard

The MNE installation is completed , but still have same error when run jupyter !!!

How are you running jupyter? Separate or pip install I’m guessing?`
Please run the jupyter provided with MNE, or open the promt MNE and run jupyterlab through this prompt.

It boils down to running jupyter in the same environment as MNE, or to run jupyter connected to a kernel (package: iypkernel) in MNE’s environment.

Mathieu

1 Like

NO jupyter with MNE just spyder. I never used it before !! however; when used code below with spyder
import numpy as np
import mne

i have error : The system cannot find the path specified.!!!
spyder installed atomically with MNE!!! why can not find the path for MNE

There is no way for us to figure this out from the little information you provide, not even the OS on which you are working. Adding 3 exclamation mark after each sentence does not count towards useful information.

Couple of options:

  • Something went wrong during the installation with the MNE installer:

  • Diagnose the path issue. Clearly, you have a path problem with jupyter/spyder not getting the correct python environment to work with. This is often the case on un-clean installs of python with multiple installation medias, e.g. on macOS you could install/run python from 4 different sources → python default install provided with macOS, python installed from the official installers, python installed from homebrew, python install through conda. Successive unmanaged installation will result in an unclean state, where the operating system and other applications which depend on the python will have to pick one of those installs, and if they don’t pick the correct one (which is what is happening here) then it fails.

    • Have a look to the PATH environment variable which tells your OS and application how to look for executable, e.g. python
  • Install through a different mean

    • If you have a regular python installation, you can create a virtual environment and install MNE inside with:
python -m venv mne --copies
source mne/bin/activate  # on UNIX systems
mne/scripts/activate.bat  # on Windows
python -m pip install jupyterlab ipython spyder mne

Mathieu

OK, i will uninstall all of them .