Failed to enable GUI event loop integration for 'qt5'


I recently updated to PyCharm 2018.1.2 from 2017.?. Now whenever I run a script in PyCharm that references matplotlib the debugger will fail and show the call stack below.

I have File | Settings | Tools | Python Scientific | Show plots in tool window disabled. Having it disabled worked fine in the 2017 release but with the update to 2018 it doesn't. If I turn it on then the debugger works fine. Why has the behavior of this option changed?


import matplotlib.pyplot as plt

File "C:\Users\tj\AppData\Local\Continuum\Anaconda3\lib\site-packages\matplotlib\", line 115, in <module>
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "C:\Users\tj\AppData\Local\Continuum\Anaconda3\lib\site-packages\matplotlib\backends\", line 62, in pylab_setup
[backend_name], 0)
File "C:\Users\tj\AppData\Local\Continuum\Anaconda3\lib\site-packages\matplotlib\backends\", line 15, in <module>
from .backend_qt5 import (
File "C:\Users\tj\AppData\Local\Continuum\Anaconda3\lib\site-packages\matplotlib\backends\", line 19, in <module>
import matplotlib.backends.qt_editor.figureoptions as figureoptions
File "C:\Users\tj\AppData\Local\Continuum\Anaconda3\lib\site-packages\matplotlib\backends\qt_editor\", line 20, in <module>
import matplotlib.backends.qt_editor.formlayout as formlayout
File "C:\Users\tj\AppData\Local\Continuum\Anaconda3\lib\site-packages\matplotlib\backends\qt_editor\", line 54, in <module>
from matplotlib.backends.qt_compat import QtGui, QtWidgets, QtCore
File "C:\Users\tj\AppData\Local\Continuum\Anaconda3\lib\site-packages\matplotlib\backends\", line 140, in <module>
from PyQt5 import QtCore, QtGui, QtWidgets
ImportError: DLL load failed: The specified procedure could not be found.
Failed to enable GUI event loop integration for 'qt5'



I have the same problem. Anyone?


Could you please run 

import matplotlib

grab the path to matplotlibrc, open it and specify the backend value?

backend    : xxx

Does only debug fail? Which version of matplotlib are you using?

I created a ticket in our bug tracker: Please feel free to comment there.


Please sign in to leave a comment.