2019-01-16, Wed, 02:20 Sandro Tosi <mo...@debian.org> wrote: > > * What exactly did you do (or not do) that was effective (or > > ineffective)? > > Due to bug#889137 I modified one program line from this: > > > > from matplotlib.backends.backend_gtkagg import > NavigationToolbar2GTKAgg > > > > to this: > > > > from matplotlib.backends.backend_gtk3agg import > NavigationToolbar2GTKAgg > > the proper way to switch backend is either by using the matplotlibrc > configuration file or using `matplotlib.use(backend)` command, like: > > >>> import matplotlib as mpl > >>> mpl.use('Gtk3Agg') > >>> import matplotlib.pyplot as plt >
OK, so I used the above instead that obscure backend_gtk3agg hack. I am still not sure what to do about NavigationToolbar2GTKAgg part -- will that work out of the box? I appreciate your effort, but generic answers on how to work in python are not helpful. I am not in python business, and I am not going to rewrite the program -- it is not mine to begin with. So now I get the next error, exactly the same as I have reported in the original report: File "/usr/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 115, in <module> _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup() File "/usr/lib/python2.7/dist-packages/matplotlib/backends/__init__.py", line 62, in pylab_setup [backend_name], 0) File "/usr/lib/python2.7/dist-packages/matplotlib/backends/backend_gtk3agg.py", line 9, in <module> from . import backend_agg, backend_gtk3 File "/usr/lib/python2.7/dist-packages/matplotlib/backends/backend_gtk3.py", line 19, in <module> from ._gtk3_compat import GLib, GObject, Gtk, Gdk File "/usr/lib/python2.7/dist-packages/matplotlib/backends/_gtk3_compat.py", line 34, in <module> raise ImportError("The Gtk3 backend requires PyGObject or pgi") ImportError: The Gtk3 backend requires PyGObject or pgi What is this about? It would be so much better if one would read the report in full. Note that python-gobject-xxx and python-gi-xxx are installed, see the original report.