Could not load any valid 3D backend (Mayavi or PyVista) while using MNE-Python

Hi,

I want to plot source estimates on an inflated brain surface and I am using a Linux terminal. I ran into a RuntimeError: Could not load any valid 3D backend: ['mayavi', 'pyvista']. To enable the Qt matplotlib backend, I opened IPython terminal using:

$ ipython --matplotlib=qt

as mentioned in the link: https://mne.tools/stable/install/advanced.html. I also installed PyVista and Mayavi.
Is there anything else I need to do to be able to load the backend in Python?

Thanks,
Manorama Kadwani
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200609/9fa64965/attachment.html

External Email - Use Caution

can you report what

mne.sys_info()

prints on your machine?

you must have an install problem of mayavi and pyvista

A
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200609/754000df/attachment.html

You were right. There is an install problem as both of them were not found in the results of mne.sys_info():

Qt WebEngine seems to be initialized from a plugin. Please set Qt::AA_ShareOpenGLContexts using QCoreApplication::setAttribute before constructing QGuiApplication.
Platform: Linux-5.3.0-53-generic-x86_64-with-debian-buster-sid
Python: 3.7.6 (default, Jan 8 2020, 19:59:22) [GCC 7.3.0]
Executable: /home/manoramak/anaconda3/bin/python
CPU: x86_64: 20 cores
Memory: 62.5 GB

mne: 0.20.0
numpy: 1.18.1 {blas=mkl_rt, lapack=mkl_rt}
scipy: 1.4.1
matplotlib: 3.1.3 {backend=Qt5Agg}

sklearn: 0.22.1
numba: 0.48.0
nibabel: 3.1.0
cupy: Not found
pandas: 1.0.1
dipy: Not found
mayavi: Not found
pyvista: Not found
vtk: Not found

1 Like