- MNE version: mne-base 0.24.0, mne-qt-browser 0.1.6
- operating system: macOS 12 (M1 Pro)
I ran the example code
import os.path as op
import numpy as np
import matplotlib.pyplot as plt
from mne.datasets import sample, fetch_hcp_mmp_parcellation
from mne.minimum_norm import apply_inverse, read_inverse_operator
from mne import read_evokeds
os.environ['ETS_TOOLKIT'] = 'qt4'
os.environ['QT_API'] = 'pyqt5'
# os.environ['MNE_3D_OPTION_ANTIALIAS'] = 'false'
data_path = sample.data_path()
sample_dir = op.join(data_path, 'MEG', 'sample')
subjects_dir = op.join(data_path, 'subjects')
fname_evoked = op.join(data_path, 'MEG', 'sample', 'sample_audvis-ave.fif')
fname_stc = op.join(sample_dir, 'sample_audvis-meg')
stc = mne.read_source_estimate(fname_stc, subject='sample')
initial_time = 0.1
brain = stc.plot(subjects_dir=subjects_dir, initial_time=initial_time, clim=dict(kind='value', lims=[3, 6, 9]))
and the plot just show for a second than crashed, and showed below error message:
Using pyvistaqt 3d backend.
Traceback (most recent call last):
File "/Users/PPMc/miniforge3/envs/TPSE/lib/python3.8/site-packages/pyvistaqt/plotting.py", line 581, in close
RuntimeError: wrapped C/C++ object of type MainWindow has been deleted
zsh: abort /Users/PPMc/miniforge3/envs/TPSE/bin/python
and I can’t found out why and how can I solve this issue.
Hello @tPPMc-cs, M1 machines are still a little bit difficult to set up correctly for MNE. This will be improved over the course of the next few months, but for now it’s not a really smooth experience.
@Denis just reported on Twitter how he got things to work on his M1:
I hope that helps!
i followed the steps that
have been posted,
- mamba create -n <my_env_name> mne
- pip install vtk mayavi
- conda install -c andfoy pyqt5-sip
- pip install pyvista
- pip install pyvistaqt
but i still get errors:
RuntimeError: wrapped C/C++ object of type _VTKRenderWindowInteractor has been deleted!
which packages that mamba had been installed?
I will only get my hands on an Apple Silicon machine within the next couple of days; until then, I cannot really help you, I’m afraid But maybe @Denis will find some time before that. Otherwise, unfortunately you’ll have to be patient.
so thankful for your patient reply~
I will be grateful if you can answer my question after you get your Apple Silicon machine~
How is it going? Did it worked on M1 MacbookPro?
Hello @tPPMc-cs, unfortunately I did not yet have time to try this one out due to the pandemic and the holiday season. I’ll try to do it next week, ok? I’ll keep you posted.
How is it going? Did it work?
Hello @tPPMc-cs, sorry for never getting back to you.
With our new installers, everything should work on M1 machines.