Support for GTK2 backends broken (18.04 bionic)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
matplotlib (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
As of 18.04, it seems that support for the GTKCairo and GTKAgg (GTK2) backends for matplotlib (2.1.1-2ubuntu3) are broken.
To demonstrate, the following runs without error on 16.04, but produces error messages (see below*) on 18.04:
ipython
import matplotlib; matplotlib.
import pylab
The final error message is "ImportError: No module named _backend_gdk". It is clear that the _backend_gdk file is not provided in the python-matplotlib package, whereas it was in Ubuntu 16.04; see below from 'dpkg -L python-matplotlib':
/usr/lib/
It seems that the Build-Depends for python-matplotlib should perhaps include python-gtk2-dev in order to resolve this problem:
https:/
*Error messages note above:
Gtk-Message: 17:45:01.751: Failed to load module "canberra-
(ipython:10617): dbind-WARNING **: 17:45:01.756: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
-------
ImportError Traceback (most recent call last)
<ipython-
----> 1 import pylab
/usr/lib/
----> 1 from matplotlib.pylab import *
2 import matplotlib.pylab
3 __doc__ = matplotlib.
/usr/lib/
255 window_hanning, window_none)
256
--> 257 from matplotlib import cbook, mlab, pyplot as plt
258 from matplotlib.pyplot import *
259
/usr/lib/
114 ## Global ##
115
--> 116 _backend_mod, new_figure_manager, draw_if_
117
118 _IP_REGISTERED = None
/usr/lib/
58 # imports. 0 means only perform absolute imports.
59 backend_mod = __import_
---> 60 [backend_name], 0)
61
62 # Things we pull in from all backends
/usr/lib/
12 from matplotlib.figure import Figure
13 from matplotlib.
---> 14 from matplotlib.
15 gtk, _BackendGTK, FigureCanvasGTK, FigureManagerGTK, NavigationToolb
16 backend_version, error_msg_gtk, PIXELS_PER_INCH)
/usr/lib/
33 TimerBase, cursors)
34
---> 35 from matplotlib.
36 from matplotlib.cbook import is_writable_
37 from matplotlib.figure import Figure
/usr/lib/
31 from matplotlib.mathtext import MathTextParser
32 from matplotlib.
---> 33 from matplotlib.
34
35 backend_version = "%d.%d.%d" % gtk.pygtk_version
ImportError: No module named _backend_gdk
I had a go a patching matplotlib so that the python2 package would at least contain the GTK backends. /launchpad. net/~jdpipe/ +archive/ ubuntu/ ppa/+packages
https:/