# RuntimeError: Could not load any valid 3D backend: pyvista, mayavi, notebook (error only for .py not for IPython)

**URL:** <https://mne.discourse.group/t/runtimeerror-could-not-load-any-valid-3d-backend-pyvista-mayavi-notebook-error-only-for-py-not-for-ipython/3311>\
**Category:** Support & Discussions\
**Created:** [June 24, 2021, 3:39pm UTC](https://mne.discourse.group/t/runtimeerror-could-not-load-any-valid-3d-backend-pyvista-mayavi-notebook-error-only-for-py-not-for-ipython/3311 "2021-06-24T15:39:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![datalw](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/datalw/32/133_2.png) [@datalw](https://mne.discourse.group/u/datalw)\
**Post date:** [June 24, 2021, 3:39pm UTC](https://mne.discourse.group/t/runtimeerror-could-not-load-any-valid-3d-backend-pyvista-mayavi-notebook-error-only-for-py-not-for-ipython/3311/1 "2021-06-24T15:39:45Z")

</div>

Hi everyone,  
I have got this error while using `plot_sensors_connectivity`. I only have this error running in the terminal (.py), not in IPython though.

- MNE-Python version: 0.23.0
- operating system: windows 10

I saw the same issue [here](https://mne.discourse.group/t/could-not-load-any-valid-3d-backend-mayavi-or-pyvista-while-using-mne-python/2215). But I indeed have pyvista and mayavi in my envinronment. See the outputs of `mne.sys_info()` below:

```python
Platform: Windows-10-10.0.19041-SP0
Python: 3.8.5 (default, Sep 3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)]
Executable: C:\Users\luwan\.conda\envs\mne_new\python.exe
CPU: Intel64 Family 6 Model 142 Stepping 10, GenuineIntel: 8 cores
Memory: 7.9 GB

mne: 0.23.0
numpy: 1.19.2 {blas=D:\\a\\1\\s\\numpy\\build\\openblas_info, lapack=D:\\a\\1\\s\\numpy\\build\\openblas_lapack_info}
scipy: 1.6.0
matplotlib: 3.3.2 {backend=Qt5Agg}

sklearn: 0.23.2
numba: 0.51.2
nibabel: 3.2.1
nilearn: 0.7.0
dipy: Not found
cupy: Not found
pandas: 1.2.1
mayavi: 4.7.4.dev0
pyvista: 0.31.3 {pyvistaqt=0.5.0, OpenGL 4.5.0 - Build 27.20.100.8854 via Intel(R) UHD Graphics 620}
vtk: 9.0.1
PyQt5: 5.9.2

```

Do I have to do some special setting for running in the terminal? Thanks a lot for the help!

---

<div class="post-metadata">

**Author:** ![drammock](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/drammock/32/4_2.png) [@drammock](https://mne.discourse.group/u/drammock)\
**Post date:** [June 29, 2021, 2:49pm UTC](https://mne.discourse.group/t/runtimeerror-could-not-load-any-valid-3d-backend-pyvista-mayavi-notebook-error-only-for-py-not-for-ipython/3311/2 "2021-06-29T14:49:21Z")

</div>

is that the output of `mne.sys_info()` when run in iPython, or when run in regular Python in the terminal? My best guess would be that this is a problem with conda (or venv?), where typing `ipython` loads ipython (and python) from one environment, while typing `python` loads python from a different environment. You can check the third line (“executable”) to check this.
