Skip to content

Error with PySide6 when using matplotlib: Failed to enable GUI event loop integration for 'qt' #1222

Closed

Description

@MarcosCalvi

Hello, I am having this problem when I try to debug an app using PySide6 and matplotlib, it uses some graphs and seems to be the part that goes wrong.

This is the output in the console:

Failed to enable GUI event loop integration for 'qt'
Traceback (most recent call last):
File "c:\Users\marco.vscode\extensions\ms-python.python-2023.3.10581011\pythonFiles\lib\python\debugpy_vendored\pydevd\pydev_ipython\matplotlibtools.py", line 30, in do_enable_gui
enable_gui(guiname)
File "c:\Users\marco.vscode\extensions\ms-python.python-2023.3.10581011\pythonFiles\lib\python\debugpy_vendored\pydevd\pydev_ipython\inputhook.py", line 540, in enable_gui
return gui_hook(app)
File "c:\Users\marco.vscode\extensions\ms-python.python-2023.3.10581011\pythonFiles\lib\python\debugpy_vendored\pydevd\pydev_ipython\inputhook.py", line 176, in enable_qt
from pydev_ipython.qt_for_kernel import QT_API, QT_API_PYQT5
File "c:\Users\marco.vscode\extensions\ms-python.python-2023.3.10581011\pythonFiles\lib\python\debugpy_vendored\pydevd\pydev_ipython\qt_for_kernel.py", line 116, in
QtCore, QtGui, QtSvg, QT_API = load_qt(api_opts)
File "c:\Users\marco.vscode\extensions\ms-python.python-2023.3.10581011\pythonFiles\lib\python\debugpy_vendored\pydevd\pydev_ipython\qt_loaders.py", line 285, in load_qt
raise ImportError("""
ImportError:
Could not load requested Qt binding. Please ensure that
PyQt4 >= 4.7 or PySide >= 1.0.3 is available,
and only one is imported per session.

Currently-imported Qt library:   None
PyQt4 installed:                 False
PyQt5 installed:                 False
PySide >= 1.0.3 installed:       False
PySide2 installed:               False
Tried to load:                   ['pyqtdefault', 'pyside', 'pyside2', 'pyqt5']

Backend QtAgg is interactive backend. Turning interactive mode on.

I am using PySide6 and I think the qt_loaders is what is missing Qt6.

Any help?

Activity

  1. int19h commented on Feb 27, 2023

    @int19h
    Contributor

    The debugger doesn't support Qt6 at the moment - see #1112

    (You can still debug, but none of the special integration features are expected to work.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions