Mailinglist Archive: opensuse-bugs (6470 mails)

< Previous Next >
[Bug 1136643] IPython console in spyder3 breaks after an exception error
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Mon, 01 Jul 2019 07:30:44 +0000
  • Message-id: <bug-1136643-21960-pMNzYwA3Sq@http.bugzilla.opensuse.org/>
http://bugzilla.opensuse.org/show_bug.cgi?id=1136643
http://bugzilla.opensuse.org/show_bug.cgi?id=1136643#c1

--- Comment #1 from Rodolfo Marques <rodolfo.am25@xxxxxxxxx> ---
I did a further inspection in order to recreate the problem and found out that
this problem appears after installing matplotlib plotting backends. Here's what
I did:

1) First I uninstalled all previously installed matplotlib components:
python3-matplotlib-2.0.2-lp151.3.6.x86_64
python3-matplotlib-cairo-2.0.2-lp151.3.6.x86_64
python3-matplotlib-gtk3-2.0.2-lp151.3.6.x86_64
python3-matplotlib-tk-2.0.2-lp151.3.6.x86_64
python3-scikit-learn-0.20.2-lp151.1.8.x86_64
NOTE: at this point the interactive console behaves normally, i.e. no bug

2) Reinstalled python3-matplotlib:
python3-matplotlib-2.0.2-lp151.3.6.x86_64
python3-matplotlib-tk-2.0.2-lp151.3.6.x86_64 (recommended)
After installing these components the interactive console in spyder crashes due
to matplotlib backends not being found. Here is the error output:

Traceback (most recent call last):
File
"/usr/lib/python3.6/site-packages/spyder/utils/ipython/spyder_kernel.py", line
498, in _set_mpl_backend
get_ipython().run_line_magic(magic, backend)
File "/usr/lib/python3.6/site-packages/IPython/core/interactiveshell.py",
line 2307, in run_line_magic
result = fn(*args, **kwargs)
File "</usr/lib/python3.6/site-packages/decorator.py:decorator-gen-108>",
line 2, in matplotlib
File "/usr/lib/python3.6/site-packages/IPython/core/magic.py", line 187,
in <lambda>
call = lambda f, *a, **k: f(*a, **k)
File "/usr/lib/python3.6/site-packages/IPython/core/magics/pylab.py",
line 99, in matplotlib
gui, backend = self.shell.enable_matplotlib(args.gui)
File "/usr/lib/python3.6/site-packages/IPython/core/interactiveshell.py",
line 3384, in enable_matplotlib
pt.activate_matplotlib(backend)
File "/usr/lib/python3.6/site-packages/IPython/core/pylabtools.py", line
313, in activate_matplotlib
import matplotlib.pyplot
File "/usr/lib64/python3.6/site-packages/matplotlib/pyplot.py", line 115,
in <module>
_backend_mod, new_figure_manager, draw_if_interactive, _show =
pylab_setup()
File
"/usr/lib64/python3.6/site-packages/matplotlib/backends/__init__.py", line 32,
in pylab_setup
globals(),locals(),[backend_name],0)
ModuleNotFoundError: No module named 'matplotlib.backends.backend_gtk3agg'

3) Installed the following packages:
python3-matplotlib-gtk3-2.0.2-lp151.3.6.x86_64
python3-matplotlib-cairo-2.0.2-lp151.3.6.x86_64 (recommended)

After this the error when starting the interactive console in spyder disappears
but the original bug appears.

ADDITIONAL NOTE: I created a simple Python environment installing only spyder,
ipython (pip install spyder ipython), tested it and it was ok. After installing
matplotlib I received error messages for the cairo and GTK backends. Installed
pycairo and pygobject from pip and the original bug was recreated in spyder's
interactive console.

--
You are receiving this mail because:
You are on the CC list for the bug.
< Previous Next >