I started by creating the conda virtual environment using anaconda.
conda create -n mne3 python=3.9
conda activate mne3
Then I installed jupyter and spyder.
conda install -c anaconda spyder
conda install -c conda-forge jupyterlab
And at this point, I started spyder and jupyter and everything was fine.
Then I installed mne, referring to the installation instructions for version 0.24, because the mamba installation method used in version 1.2 of mne does not work on my computer.
Then after I installed mne, I started jupyer and spyder with the following error.
jupyter lab
10190 segmentation fault jupyter lab
spyder
/Users//opt/anaconda3/envs/mne3/bin/pythonw: line 3: 10217 Segmentation fault: 11 /Users///opt/anaconda3/envs/mne3/python.app/Contents/MacOS/python “$@”
This is my system information
python -c “import mne; mne.sys_info()”
Platform: macOS-10.14.6-x86_64-i386-64bit
Python: 3.9.15 | packaged by conda-forge | (main, Nov 22 2022, 08:50:29) [Clang 14.0.6 ]
Executable: /Users//opt/anaconda3/envs/mne3/bin/python
CPU: i386: 8 cores
Memory: 16.0 GB
mne: 1.2.2
numpy: 1.21.6 {OpenBLAS 0.3.18 with 8 threads}
scipy: 1.9.3
matplotlib: 3.6.2 {backend=MacOSX}
sklearn: 1.0.2
numba: 0.55.1
nibabel: 4.0.2
nilearn: 0.9.2
dipy: 1.5.0
openmeeg: Not found
cupy: Not found
pandas: 1.5.2
pyvista: 0.37.0 {OpenGL 4.1 ATI-2.11.20 via AMD Radeon Pro 555 OpenGL Engine}
pyvistaqt: 0.9.0
ipyvtklink: 0.2.3
vtk: 9.1.0
qtpy: 2.2.0 {PyQt5=5.15.2}
ipympl: Not found
pyqtgraph: 0.13.1
pooch: v1.6.0
mne_bids: Not found
mne_nirs: Not found
mne_features: Not found
mne_qt_browser: 0.4.0
mne_connectivity: Not found
mne_icalabel: 0.4
Hello @elvisjade, could you please elaborate on the issues you were experiencing with our mamba-based installation instructions? It’s very important to us to make it easy for users to install and use the latest versions of MNE-Python.
You could also consider using our standalone installers, which come with Spider and Jupyter Lab pre-installed!
Also as a general tip when installing packages with complex dependencies via conda or mamba: install eve thing in a single go, do not first install package A and then package B, but install all packages at once, with a single call to conda or mamba. This can avoid problems.
standalone installers might not be an option for me to consider.
Because I am more accustomed to using the conda environment, if there is any problem, I can delete the environment in time, which is more fault-tolerant for me.
If it is installed independently, it may involve problems such as the mac version or python in the mac system. If I do something wrong in some places, I may not be able to detect it myself.
Of course, independent installation is very convenient for many people, and I recommend it very much, but I prefer the conda environment.
This error is reported when I install using mamba.
mamba create --override-channels --channel=conda-forge --name=mne mne
ERROR transaction.cpp:84 File not valid: file size doesn't match expectation "/Users//opt/anaconda3/pkgs/click-8.1.3-py310h2ec42d9_1.tar.bz2"
click [======================] (00m:00s) Validating...
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: File not valid: file size doesn't match expectation (/Users/hasibagen/
click [======================] (00m:00s) Validating...
future [======================] (00m:00s) Validating...
[1] 10705 abort mamba create --override-channels --channel=conda-forge --name=mne mne
I googled this error. It seems that this error is because I used the mirror source of conda. Because I am in mainland China, the speed of directly accessing the source of conda is relatively slow. I used a mirror in China, but it seems to report an error.
This is my conda mirror source setup:
conda info
active environment : base
active env location : /Users/hasibagen/opt/anaconda3
shell level : 1
user config file : /Users/hasibagen/.condarc
populated config files : /Users/hasibagen/.condarc
conda version : 4.12.0
conda-build version : 3.21.5
python version : 3.9.7.final.0
virtual packages : __osx=10.14.6=0
__unix=0=0
__archspec=1=x86_64
base environment : /Users/hasibagen/opt/anaconda3 (writable)
conda av data dir : /Users/hasibagen/opt/anaconda3/etc/conda
conda av metadata url : None
channel URLs : https://mirrors.bfsu.edu.cn/anaconda/pkgs/main/osx-64
https://mirrors.bfsu.edu.cn/anaconda/pkgs/main/noarch
https://mirrors.bfsu.edu.cn/anaconda/pkgs/r/osx-64
https://mirrors.bfsu.edu.cn/anaconda/pkgs/r/noarch
https://mirrors.bfsu.edu.cn/anaconda/pkgs/msys2/osx-64
https://mirrors.bfsu.edu.cn/anaconda/pkgs/msys2/noarch
package cache : /Users/hasibagen/opt/anaconda3/pkgs
/Users/hasibagen/.conda/pkgs
envs directories : /Users/hasibagen/opt/anaconda3/envs
/Users/hasibagen/.conda/envs
platform : osx-64
user-agent : conda/4.12.0 requests/2.26.0 CPython/3.9.7 Darwin/18.7.0 OSX/10.14.6
UID:GID : 501:20
netrc file : None
offline mode : False
The standalone installer simply deploys a conda environment and adds a few icons, that’s all. You end up with a complete and fully functional conda environment.