mne.viz.plot_alignmet() not working

  • MNE version: e.g. 1.1.1
  • operating system: e.g. Linux MInt

Hello All

I am using VSCode on Linux mint. I first activate the mne virtual environment, now whenever I run the command
fig = mne.viz.plot_alignment(raw.info, trans=trans, subject='sample', subjects_dir=subjects_dir, surfaces='head-dense', show_axes=True, dig=True, eeg=[], meg='sensors', coord_frame='meg', mri_fiducials='estimated')
I see the following error:

I also tried then pip3 install pyvista and ipywidgets (after activation of mne_fun virtual env), but nothing happens and the code still crashes.
When I run:
mne.sys_info()
I don’t see pyvista in it even after doing pip install.

Pleaseeeee can someone guide how to fix this issue. I also tried to pip uninstall and then reinstall pyvista.
Thank you!!

Hello @Namsakhi, and welcome to the forum!

I suggest to do a fresh install of MNE-Python following our official installation instructions, or using our stand-alone installer. Otherwise it can be difficult to get everything working correctly.

Best wishes,
Richard

1 Like

I figured out

mne.viz.set_3d_backend("notebook")
pip3 install ipyevents
pip3 install pyvista

It is weird that the error was: try pip install pyvista (when it was already installed), what was missing was ipyevents.
Now I have pyvista in mne.sys_info() also, so it s all good now :smiley:
Thank you !!

1 Like