Can't plot with functions which use pyvistaqt

Hello everyone!

I’m having problem using functions which use pyvistaqt for plotting. When I run the example script from the MNE-Python webiste:

from pathlib import Path

import mne
from mne.datasets import sample, spm_face, testing
from mne.io import (
    read_raw_artemis123,
    read_raw_bti,
    read_raw_ctf,
    read_raw_fif,
    read_raw_kit,
)
from mne.viz import plot_alignment, set_3d_title

print(__doc__)

root_path = Path(mne.__file__).parent.absolute()


kwargs = dict(eeg=False, coord_frame="meg", show_axes=True, verbose=True)

raw = read_raw_fif(sample.data_path() / "MEG" / "sample" / "sample_audvis_raw.fif")
fig = plot_alignment(raw.info, meg=("helmet", "sensors"), **kwargs)
set_3d_title(figure=fig, title="Neuromag")

I get the following Segmentation fault

(mne)$ python MNE-plot-aligment-test.py 
None
Opening raw data file /home/workma/mne_data/MNE-sample-data/MEG/sample/sample_audvis_raw.fif...
    Read a total of 3 projection items:
        PCA-v1 (1 x 102)  idle
        PCA-v2 (1 x 102)  idle
        PCA-v3 (1 x 102)  idle
    Range : 25800 ... 192599 =     42.956 ...   320.670 secs
Ready.
Using pyvistaqt 3d backend.

qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
Segmentation fault (core dumped)

If I add to the code

import os
os.environ["QT_API"] = "PyQT6"

I get rid of the message qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in "", but the Segmentation fault (core dumped) stays. A blank black window pops up for 1 second, which previously does not occur.

My clean install on Fedora 38 (used conda create --override-channels --channel=conda-forge --name=mne mne):

>>> mne.sys_info()
Platform             Linux-6.2.14-300.fc38.x86_64-x86_64-with-glibc2.37
Python               3.10.11 | packaged by conda-forge | (main, May 10 2023, 18:58:44) [GCC 11.3.0]
Executable           /home/workma/.var/miniconda3/envs/mne/bin/python
CPU                   (12 cores)
Memory               30.5 GB

Core
β”œβ˜‘ mne               1.4.0
β”œβ˜‘ numpy             1.23.5 (OpenBLAS 0.3.21 with 12 threads)
β”œβ˜‘ scipy             1.10.1
β”œβ˜‘ matplotlib        3.7.1 (backend=QtAgg)
β”œβ˜‘ pooch             1.7.0
β””β˜‘ jinja2            3.1.2

Numerical (optional)
β”œβ˜‘ sklearn           1.2.2
β”œβ˜‘ numba             0.56.4
β”œβ˜‘ nibabel           5.1.0
β”œβ˜‘ nilearn           0.10.1
β”œβ˜‘ dipy              1.7.0
β”œβ˜‘ openmeeg          2.5.6
β”œβ˜‘ pandas            2.0.1
β””β˜ unavailable       cupy

Visualization (optional)
β”œβ˜‘ pyvista           0.39.0 (OpenGL 4.6 (Core Profile) Mesa 23.0.3 via AMD Radeon RX 6650 XT (navi23, LLVM 16.0.1, DRM 3.49, 6.2.14-300.fc38.x86_64))
β”œβ˜‘ pyvistaqt         0.0.0
β”œβ˜‘ ipyvtklink        0.2.2
β”œβ˜‘ vtk               9.2.6
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
β”œβ˜‘ qtpy              2.3.1 (PyQt5=5.15.6)
β”œβ˜‘ pyqtgraph         0.13.3
β”œβ˜‘ mne-qt-browser    0.0.0
β””β˜ unavailable       ipympl

Ecosystem (optional)
β””β˜ unavailable       mne-bids, mne-nirs, mne-features, mne-connectivity, mne-icalabel, mne-bids-pipeline

Then I tried to install the pip version of MNE and pyvistaqt. I created a new conda env and installed pyvista and pyvistaqt etc. with pip. This is the mne.sys_info():

mne.sys_info()
Platform:         Linux-6.2.14-300.fc38.x86_64-x86_64-with-glibc2.37
Python:           3.11.3 (main, Apr 19 2023, 23:54:32) [GCC 11.2.0]
Executable:       /home/workma/.var/miniconda3/envs/mne-pip/bin/python
CPU:              : 12 cores
Memory:           30.5 GB

mne:              1.3.1
numpy:            1.24.3 {unknown linalg bindings (threadpoolctl module not found: No module named 'threadpoolctl')}
scipy:            1.10.1
matplotlib:       3.7.1 {backend=QtAgg}

sklearn:          Not found
numba:            Not found
nibabel:          Not found
nilearn:          Not found
dipy:             Not found
openmeeg:         Not found
cupy:             Not found
pandas:           Not found
pyvista:          0.38.5 {OpenGL 4.6 (Core Profile) Mesa 23.0.3 via AMD Radeon RX 6650 XT (navi23, LLVM 16.0.1, DRM 3.49, 6.2.14-300.fc38.x86_64)}
pyvistaqt:        0.10.0
ipyvtklink:       0.2.3
vtk:              9.2.6
qtpy:             2.3.1 {PyQt5=5.15.2}
ipympl:           Not found
pyqtgraph:        Not found
pooch:            v1.7.0

mne_bids:         Not found
mne_nirs:         Not found
mne_features:     Not found
mne_qt_browser:   Not found
mne_connectivity: Not found
mne_icalabel:     Not found

If I add to the code

import os
os.environ["QT_API"] = "PyQT6"

I get the window


but when I close I get the error

HBox(children=(Text(value='', layout=Layout(margin='2px 0px 2px 0px', min_width='0px'), placeholder='Type a file name'), Button(icon='camera', layout=Layout(margin='2px 0px 2px 0px', min_width='0px'), style=ButtonStyle(), tooltip='Take a screenshot')))
/home/workma/.local/lib/python3.11/site-packages/pyvista/plotting/plotting.py:6510: UserWarning: Not within a jupyter notebook environment.
Ignoring ``jupyter_backend``.
  warnings.warn(
Traceback (most recent call last):
  File "/home/workma/DevExamples/MNEExample/MNE-plot-aligment-test.py", line 26, in <module>
    fig = plot_alignment(raw.info, meg=("helmet", "sensors"), **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<decorator-gen-122>", line 10, in plot_alignment
  File "/home/workma/.local/lib/python3.11/site-packages/mne/viz/_3d.py", line 833, in plot_alignment
    renderer.show()
  File "/home/workma/.local/lib/python3.11/site-packages/mne/viz/backends/_notebook.py", line 1460, in show
    viewer.layout.width = None  # unlock the fixed layout
    ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'layout'

If I add to the code

import os
os.environ["QT_QPA_PLATFORM"] = "xcb"

I get no error, but the pplot hides in 1 s.

I apologize for my long post. Does someone know what could be the issue?

1 Like

Hello,

What if you try a simple Qt application, what about a simple pyvista application and what about a simple pyvistaqt application by themselves? It sounds to me like a dependency issue, but as I don’t use Fedora I can not tell you which one it might be.

For instance, for the pyvistaqt application, you could clone the repository and run the tests locally, see if that works.

Mathieu

Thank you for your suggestions. I had to install many dependencies to run the pytest. This is the output:

(mne) [workma@workhorse pyvistaqt]$ pytest
=============================================== test session starts ================================================
platform linux -- Python 3.10.11, pytest-7.3.1, pluggy-1.0.0
PyQt5 5.15.7 -- Qt runtime 5.15.8 -- Qt compiled 5.15.6
rootdir: /home/workma/DevExamples/pyvistaqt
configfile: pytest.ini
plugins: anyio-3.6.2, hypothesis-6.75.3, cov-4.0.0, qt-4.2.0
collected 45 items                                                                                                 

tests/test_plotting.py .....Traceback (most recent call last):
  File "/home/workma/DevExamples/pyvistaqt/pyvistaqt/rwi.py", line 478, in resizeEvent
    self._RenderWindow.SetDPI(int(round(72*scale)))
AttributeError: 'NoneType' object has no attribute 'SetDPI'

If you suspect this is an IPython 8.13.2 bug, please report it at:
    https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@python.org

You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
    %config Application.verbose_crash=True

.......EEEEE...EEEEEEE...EEEEEEEEEEEEEE                                          [ 97%]
tests/test_qt.py .                                                                                           [100%]

====================================================== ERRORS ======================================================
__________________________________________ ERROR at setup of test_editor ___________________________________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
_______________________________________ ERROR at setup of test_qt_interactor _______________________________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
___________________________ ERROR at setup of test_background_plotting_axes_scale[True] ____________________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
___________________________ ERROR at setup of test_background_plotting_axes_scale[False] ___________________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
________________________________ ERROR at setup of test_background_plotting_camera _________________________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
___________________________ ERROR at setup of test_background_plotter_export_files[True] ___________________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
__________________________ ERROR at setup of test_background_plotter_export_files[False] ___________________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
___________________________ ERROR at setup of test_background_plotter_export_vtkjs[True] ___________________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
__________________________ ERROR at setup of test_background_plotter_export_vtkjs[False] ___________________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
_________________________________ ERROR at setup of test_background_plotting_orbit _________________________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
________________________________ ERROR at setup of test_background_plotting_toolbar ________________________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
_______________________________ ERROR at setup of test_background_plotting_menu_bar ________________________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
_____________________________ ERROR at setup of test_background_plotting_add_callback ______________________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
_______________________ ERROR at setup of test_background_plotting_close[True-plotter_close] _______________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
_______________________ ERROR at setup of test_background_plotting_close[True-window_close] ________________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
________________________ ERROR at setup of test_background_plotting_close[True-q_key_press] ________________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
_________________________ ERROR at setup of test_background_plotting_close[True-menu_exit] _________________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
_______________________ ERROR at setup of test_background_plotting_close[True-del_finalizer] _______________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
______________________ ERROR at setup of test_background_plotting_close[False-plotter_close] _______________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
_______________________ ERROR at setup of test_background_plotting_close[False-window_close] _______________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
_______________________ ERROR at setup of test_background_plotting_close[False-q_key_press] ________________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
________________________ ERROR at setup of test_background_plotting_close[False-menu_exit] _________________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
______________________ ERROR at setup of test_background_plotting_close[False-del_finalizer] _______________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
_______________________________________ ERROR at setup of test_multiplotter ________________________________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
________________________________ ERROR at setup of test_sphinx_gallery_scraping[1] _________________________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
________________________________ ERROR at setup of test_sphinx_gallery_scraping[2] _________________________________
tests/conftest.py:104: in plotting
    pytest.skip(NO_PLOTTING, reason="Requires system to support plotting")
E   TypeError: skip() got multiple values for argument 'reason'
=============================================== slowest 10 durations ===============================================
1.04s teardown tests/test_plotting.py::test_subplot_gc[True]
0.17s call     tests/test_plotting.py::test_depth_peeling
0.14s call     tests/test_plotting.py::test_ipython
0.11s teardown tests/test_plotting.py::test_subplot_gc[False]
0.09s call     tests/test_plotting.py::test_gesture_event
0.09s call     tests/test_plotting.py::test_smoothing
0.08s call     tests/test_plotting.py::test_link_views_across_plotters[None]
0.08s call     tests/test_plotting.py::test_drop_event
0.08s call     tests/test_plotting.py::test_link_views_across_plotters[other_views2]
0.07s call     tests/test_plotting.py::test_file_dialog
============================================= short test summary info ==============================================
ERROR tests/test_plotting.py::test_editor - TypeError: skip() got multiple values for argument 'reason'
ERROR tests/test_plotting.py::test_qt_interactor - TypeError: skip() got multiple values for argument 'reason'
ERROR tests/test_plotting.py::test_background_plotting_axes_scale[True] - TypeError: skip() got multiple values for argument 'reason'
ERROR tests/test_plotting.py::test_background_plotting_axes_scale[False] - TypeError: skip() got multiple values for argument 'reason'
ERROR tests/test_plotting.py::test_background_plotting_camera - TypeError: skip() got multiple values for argument 'reason'
ERROR tests/test_plotting.py::test_background_plotter_export_files[True] - TypeError: skip() got multiple values for argument 'reason'
ERROR tests/test_plotting.py::test_background_plotter_export_files[False] - TypeError: skip() got multiple values for argument 'reason'
ERROR tests/test_plotting.py::test_background_plotter_export_vtkjs[True] - TypeError: skip() got multiple values for argument 'reason'
ERROR tests/test_plotting.py::test_background_plotter_export_vtkjs[False] - TypeError: skip() got multiple values for argument 'reason'
ERROR tests/test_plotting.py::test_background_plotting_orbit - TypeError: skip() got multiple values for argument 'reason'
ERROR tests/test_plotting.py::test_background_plotting_toolbar - TypeError: skip() got multiple values for argument 'reason'
ERROR tests/test_plotting.py::test_background_plotting_menu_bar - TypeError: skip() got multiple values for argument 'reason'
ERROR tests/test_plotting.py::test_background_plotting_add_callback - TypeError: skip() got multiple values for argument 'reason'
ERROR tests/test_plotting.py::test_background_plotting_close[True-plotter_close] - TypeError: skip() got multiple values for argument 'reason'
ERROR tests/test_plotting.py::test_background_plotting_close[True-window_close] - TypeError: skip() got multiple values for argument 'reason'
ERROR tests/test_plotting.py::test_background_plotting_close[True-q_key_press] - TypeError: skip() got multiple values for argument 'reason'
ERROR tests/test_plotting.py::test_background_plotting_close[True-menu_exit] - TypeError: skip() got multiple values for argument 'reason'
ERROR tests/test_plotting.py::test_background_plotting_close[True-del_finalizer] - TypeError: skip() got multiple values for argument 'reason'
ERROR tests/test_plotting.py::test_background_plotting_close[False-plotter_close] - TypeError: skip() got multiple values for argument 'reason'
ERROR tests/test_plotting.py::test_background_plotting_close[False-window_close] - TypeError: skip() got multiple values for argument 'reason'
ERROR tests/test_plotting.py::test_background_plotting_close[False-q_key_press] - TypeError: skip() got multiple values for argument 'reason'
ERROR tests/test_plotting.py::test_background_plotting_close[False-menu_exit] - TypeError: skip() got multiple values for argument 'reason'
ERROR tests/test_plotting.py::test_background_plotting_close[False-del_finalizer] - TypeError: skip() got multiple values for argument 'reason'
ERROR tests/test_plotting.py::test_multiplotter - TypeError: skip() got multiple values for argument 'reason'
ERROR tests/test_plotting.py::test_sphinx_gallery_scraping[1] - TypeError: skip() got multiple values for argument 'reason'
ERROR tests/test_plotting.py::test_sphinx_gallery_scraping[2] - TypeError: skip() got multiple values for argument 'reason'
========================================== 19 passed, 26 errors in 6.46s ===========================================

Then I tried a pyvistaqt script:

import sys

# Setting the Qt bindings for QtPy
import os
os.environ["QT_API"] = "PYQT5"

from qtpy import QtWidgets

import numpy as np

import pyvista as pv
from pyvistaqt import QtInteractor, MainWindow

class MyMainWindow(MainWindow):

    def __init__(self, parent=None, show=True):
        QtWidgets.QMainWindow.__init__(self, parent)

        # create the frame
        self.frame = QtWidgets.QFrame()
        vlayout = QtWidgets.QVBoxLayout()

        # add the pyvista interactor object
        self.plotter = QtInteractor(self.frame)
        vlayout.addWidget(self.plotter.interactor)
        self.signal_close.connect(self.plotter.close)

        self.frame.setLayout(vlayout)
        self.setCentralWidget(self.frame)

        # simple menu to demo functions
        mainMenu = self.menuBar()
        fileMenu = mainMenu.addMenu('File')
        exitButton = QtWidgets.QAction('Exit', self)
        exitButton.setShortcut('Ctrl+Q')
        exitButton.triggered.connect(self.close)
        fileMenu.addAction(exitButton)

        # allow adding a sphere
        meshMenu = mainMenu.addMenu('Mesh')
        self.add_sphere_action = QtWidgets.QAction('Add Sphere', self)
        self.add_sphere_action.triggered.connect(self.add_sphere)
        meshMenu.addAction(self.add_sphere_action)

        if show:
            self.show()

    def add_sphere(self):
        """ add a sphere to the pyqt frame """
        sphere = pv.Sphere()
        self.plotter.add_mesh(sphere, show_edges=True)
        self.plotter.reset_camera()


if __name__ == '__main__':
    app = QtWidgets.QApplication(sys.argv)
    window = MyMainWindow()
    sys.exit(app.exec_())

I get the desired output:

I also tried a pyvista example script which works OK.

I have the same problem, with your code I get:
djan@djan-Creator-Z16-A11UE:~/Descargas$ python3 prueba.py
None
Opening raw data file /home/djan/mne_data/MNE-sample-data/MEG/sample/sample_audvis_raw.fif…
Read a total of 3 projection items:
PCA-v1 (1 x 102) idle
PCA-v2 (1 x 102) idle
PCA-v3 (1 x 102) idle
Range : 25800 … 192599 = 42.956 … 320.670 secs
Ready.
Using pyvistaqt 3d backend.

Traceback (most recent call last):
File β€œ/home/djan/Descargas/prueba.py”, line 22, in
fig = plot_alignment(raw.info, meg=(β€œhelmet”, β€œsensors”), **kwargs)
File β€œβ€, line 10, in plot_alignment
File β€œ/home/djan/.local/lib/python3.10/site-packages/mne/viz/_3d.py”, line 890, in plot_alignment
renderer = _get_renderer(
File β€œ/home/djan/.local/lib/python3.10/site-packages/mne/viz/backends/renderer.py”, line 50, in _get_renderer
return backend._Renderer(*args, **kwargs)
File β€œ/home/djan/.local/lib/python3.10/site-packages/mne/viz/backends/_utils.py”, line 437, in func
meth(self, *args, **kwargs)
File β€œ/home/djan/.local/lib/python3.10/site-packages/mne/viz/backends/_qt.py”, line 1770, in init
super().init(*args, **kwargs)
File β€œ/home/djan/.local/lib/python3.10/site-packages/mne/viz/backends/_pyvista.py”, line 270, in init
self._enable_antialias()
File β€œ/home/djan/.local/lib/python3.10/site-packages/mne/viz/backends/_pyvista.py”, line 885, in _enable_antialias
bad_system |= _is_mesa(self.plotter)
File β€œ/home/djan/.local/lib/python3.10/site-packages/mne/viz/backends/_pyvista.py”, line 1412, in _is_mesa
raise RuntimeError
RuntimeError

mne sys_info output:
djan@djan-Creator-Z16-A11UE:~/Descargas$ mne sys_info
Platform Linux-5.11.0-46-generic-x86_64-with-glibc2.35
Python 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0]
Executable /usr/bin/python3
CPU x86_64 (16 cores)
Memory 31.1 GB

Core
β”œβ˜‘ mne 1.4.2
β”œβ˜‘ numpy 1.24.3 (OpenBLAS 0.3.21 with 16 threads)
β”œβ˜‘ scipy 1.8.0
β”œβ˜‘ matplotlib 3.7.1 (backend=QtAgg)
β”œβ˜‘ pooch 1.7.0
β””β˜‘ jinja2 3.0.3

Numerical (optional)
β”œβ˜‘ sklearn 1.2.2
β”œβ˜‘ numba 0.57.1
β”œβ˜‘ nibabel 5.1.0
β”œβ˜‘ nilearn 0.10.1
β”œβ˜‘ dipy 1.7.0
β”œβ˜‘ openmeeg 2.5.6
β”œβ˜‘ pandas 1.3.5
β””β˜ unavailable cupy

Visualization (optional)
β”œβ˜‘ pyvista 0.39.1 (OpenGL 4.6 (Core Profile) Mesa 22.2.5-0ubuntu0.1~22.04.3 via Mesa Intel(R) UHD Graphics (TGL GT1))
β”œβ˜‘ pyvistaqt 0.9.0
β”œβ˜‘ ipyvtklink 0.2.3
β”œβ˜‘ vtk 9.2.6
β”œβ˜‘ qtpy 2.3.1 (PyQt5=5.15.2)
β”œβ˜‘ ipympl 0.9.3
β”œβ˜‘ pyqtgraph 0.12.3
β””β˜‘ mne-qt-browser 0.5.1

Ecosystem (optional)
β”œβ˜‘ mne-bids 0.12
β”œβ˜‘ mne-nirs 0.5.0
/home/djan/.local/lib/python3.10/site-packages/mne_features/utils.py:21: NumbaDeprecationWarning: The β€˜nopython’ keyword argument was not supplied to the β€˜numba.jit’ decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See Deprecation Notices β€” Numba 0.57.1+0.g04e81073b.dirty documentation for details.
@nb.jit()
β”œβ˜‘ mne-features 0.2.1
β”œβ˜‘ mne-connectivity 0.5.0
β”œβ˜‘ mne-icalabel 0.4
β””β˜‘ mne-bids-pipeline 1.3.0

Have you got any solution ??

Regards
Damian

This may not be super helpful given that vanilla pyvista / pyvistaQt examples are working, but FYI: a quick search suggests that there may be a missing system dependency qt5-wayland or qt6-wayland and possibly a needed environment variable QT_QPA_PLATFORM=wayland or QT_QPA_PLATFORM=xcb. This seems like the cleanest response: arch linux - Could not find the Qt platform plugin "wayland" - Unix & Linux Stack Exchange

but see also this answer, and this answer has advice on how to debug what is missing (in case one of the above system packages + env variable doesn’t fix it)