This issue was originally reported to the Spyder project with Issue #5989, but upon the recommendation of @CAM-Gerlach, it was found to be a QtConsole issue.
The issue reported here is much the same, but I updated it a little to just represent the process of recreating it in QtConsole.
When using the matplotlib QT5 graphics backend through IPython magic, the following error is generated:
get_ipython().run_line_magic('matplotlib', 'qt5')
Traceback (most recent call last):
File "<ipython-input-1-64557277dbff>", line 1, in <module>
get_ipython().run_line_magic('matplotlib', 'qt5')
File "C:\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2095, in run_line_magic
result = fn(*args,**kwargs)
File "<decorator-gen-108>", line 2, in matplotlib
File "C:\Anaconda3\lib\site-packages\IPython\core\magic.py", line 187, in <lambda>
call = lambda f, *a, **k: f(*a, **k)
File "C:\Anaconda3\lib\site-packages\IPython\core\magics\pylab.py", line 99, in matplotlib
gui, backend = self.shell.enable_matplotlib(args.gui)
File "C:\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2983, in enable_matplotlib
self.enable_gui(gui)
File "C:\Anaconda3\lib\site-packages\ipykernel\zmqshell.py", line 482, in enable_gui
real_enable_gui(gui)
File "C:\Anaconda3\lib\site-packages\ipykernel\eventloops.py", line 337, in enable_gui
raise RuntimeError("Cannot activate multiple GUI eventloops")
RuntimeError: Cannot activate multiple GUI eventloops
I tried running a similar set of commands in an IPython notebook (with Jupyter) and didn't receive this error:
This issue was originally reported to the Spyder project with Issue #5989, but upon the recommendation of @CAM-Gerlach, it was found to be a QtConsole issue.
The issue reported here is much the same, but I updated it a little to just represent the process of recreating it in QtConsole.
When using the matplotlib QT5 graphics backend through IPython magic, the following error is generated:
I tried running a similar set of commands in an IPython notebook (with Jupyter) and didn't receive this error:
Workaround If the backend is first set to
inline
and then set toqt
, the error is not observed.Version and main components
Spyder Dependencies