Using qt as 2D backend will restart the kernel of jupyter notebook

  • MNE version: 1.5.0
  • operating system: Ubuntu 20.04

Hello everyone,

When I using qt as 2D backend, my jupyter notebook will restart the kernal. I don’t know the reason. But if I change the matplotlib as 2D backend, I can’t run the code (part of tutorial: Annotating continuous data) below properly:

fig = raw.plot(start=2, duration=6)
fig.fake_keypress("a")

My mne.sys_info() is:

Platform Linux-5.4.0-162-generic-x86_64-with-glibc2.31
Python 3.11.4 | packaged by conda-forge | (main, Jun 10 2023, 18:08:17) [GCC 12.2.0]
Executable /home/louxc/anaconda3/envs/Tutorial/bin/python
CPU x86_64 (96 cores)
Memory 251.5 GB

Core
├☑ mne 1.5.0
├☑ numpy 1.24.4 (OpenBLAS 0.3.21 with 64 threads)
├☑ scipy 1.11.2
├☑ matplotlib 3.7.2 (backend=module://matplotlib_inline.backend_inline)
├☑ pooch 1.7.0
└☑ jinja2 3.1.2

Numerical (optional)
├☑ sklearn 1.3.0
├☑ numba 0.57.1
├☑ nibabel 5.1.0
├☑ nilearn 0.10.1
├☑ dipy 1.7.0
├☑ pandas 2.0.3
└☐ unavailable openmeeg, cupy

Visualization (optional)
├☑ pyvista 0.41.1 (OpenGL 3.3 (Core Profile) Mesa 21.2.5 via softpipe)
├☑ pyvistaqt 0.11.0
├☑ ipyvtklink 0.2.3
├☑ vtk 9.2.6
├☑ qtpy 2.3.1 (None=None)
├☑ ipympl 0.9.3
├☑ pyqtgraph 0.13.3
└☑ mne-qt-browser 0.5.2

Ecosystem (optional)
├☑ mne-bids 0.13
├☑ mne-connectivity 0.5.0
└☐ unavailable mne-nirs, mne-features, mne-icalabel, mne-bids-pipeline

I see. Qt can not run in the remote server. So I run this code in a local jupyter notebook, and it works! But the remote server is much advanced than local computer, I don’t know why mne developer use Qt.

1 Like