Installing MNE on ubuntu 22.04 using MNE-Python installers

Hello,
I try to install

  • MNE version: e.g. 1.1.1_0
    on
  • operating system: Ubuntu 22.04

First, I installed anaconda (with spyder) following instructions in
https://mne.tools/stable/install/manual_install_python.html#install-python

when I installed mne following instructions in https://mne.tools/stable/install/installers.html:
sh ./MNE-Python-1.1.1_0-Linux.sh

The installation was successful (see below), but there is no mne environment created in
~/anaconda3/envs
and the spyder does not know anything about mne.

What am I doing wrong?

Best, Elena

######################################################
CONDA_PREFIX: /home/elena/mne-python/1.1.1_0
Status: enabled
done
:information_source: Fixing menu shortcuts.
:information_source: Configuring Python to ignore user-installed local packages.
To make your changes take effect please reactivate your environment
:information_source: Disabling mamba package manager banner.
To make your changes take effect please reactivate your environment
:information_source: Running mne sys_info.
Platform: Linux-5.15.0-48-generic-x86_64-with-glibc2.35
Python: 3.10.6 (main, Aug 10 2022, 11:40:04) [GCC 11.3.0]
Executable: /usr/bin/python3
CPU: x86_64: 16 cores
Memory: 31.0 GB

mne: 0.23.4
numpy: 1.21.5 {blas=NO_ATLAS_INFO, lapack=lapack}
scipy: 1.8.0
matplotlib: 3.5.1 {backend=TkAgg}

sklearn: 0.23.2
numba: Not found
nibabel: 3.2.2
nilearn: Not found
dipy: Not found
cupy: Not found
pandas: Not found
mayavi: Not found
pyvista: Not found
vtk: 7.1.1
PyQt5: 5.15.6

installation finished.
##########################################################

The MNE-Python standalone installers don’t require installing anaconda first, they install it automatically. So probably now you have 2 different installations of anaconda in 2 different places on your computer. You’ll probably be happier if you remove one of them. Easiest is remove the system-level anaconda that you installed, and just use the MNE standalone installer. Harder (but maybe preferred if you want to use anaconda for other stuff besides MNE) is to remove the standalone installation of MNE, then follow this page: Install via pip or conda β€” MNE 1.1.1 documentation

1 Like

Ok. I do not see two anacondas, just one in my home folder:
/home/elena/anaconda3
I removed it :
rm -rf ~/anaconda3 ~/.condarc ~/.conda ~/.continuum
and from .bashrc

Then I reinstalled anaconda3
and started from scratch:
conda install --channel=conda-forge --name=base mamba

The process ended up with:
#######################
…

  • zlib β†’ libgcc-ng[version=β€˜>=7.5.0’] β†’ __glibc[version=β€˜>=2.17’]
  • zope.interface β†’ libgcc-ng[version=β€˜>=9.3.0’] β†’ __glibc[version=β€˜>=2.17’]
  • zstd β†’ libgcc-ng[version=β€˜>=9.3.0’] β†’ __glibc[version=β€˜>=2.17’]

Your installed version is: 2.35
###############################
However,
running
mamba create --override-channels --channel=conda-forge --name=mne mne

results in:
Command β€˜mamba’ not found, did you mean:
command β€˜samba’ from deb samba (2:4.15.9+dfsg-0ubuntu0.2)
Try: sudo apt install

Elena

I think there was a misunderstanding. I was suggesting to remove the system-level anaconda and don’t reinstall it β€” you don’t need to, because the MNE Standalone installer has a hidden installation of conda that you can access through the menu commands that the MNE installer created for you.

cc @richard who knows much more about the standalone installers than I do and can probably give more precise guidance.

1 Like

I understand. I just decided to try another way described in

https://mne.tools/stable/install/manual_install.html,

to be able to use anaconda for other stuff besides MNE.

/Elena