Ask Your Question
0

matplotlib GTK3Agg backend

asked 2015-11-09 14:00:38 -0600

skytux gravatar image

It seems like the GTK3Agg Matplotlib backend doesn't work anymore in Fedora 23 (it worked fine until Fedora 22):

 german  Documents  Paper_MNRAS  dist  $ ipython
Python 2.7.10 (default, Sep  8 2015, 17:20:17) 
Type "copyright", "credits" or "license" for more information.

IPython 3.2.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

 In [1]  run plot2MASSdist.py
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
/home/german/Documents/Paper_MNRAS/dist/plot2MASSdist.py in <module>()
     10 
     11 import numpy as np
---> 12 import matplotlib.pyplot as plt
     13 from matplotlib import gridspec
     14 from matplotlib.ticker import ScalarFormatter, MultipleLocator

/usr/lib64/python2.7/site-packages/matplotlib/pyplot.py in <module>()
    107 
    108 from matplotlib.backends import pylab_setup
--> 109 _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
    110 
    111 

/usr/lib64/python2.7/site-packages/matplotlib/backends/__init__.pyc in pylab_setup()
     30     # imports. 0 means only perform absolute imports.
     31     backend_mod = __import__(backend_name,
---> 32                              globals(),locals(),[backend_name],0)
     33 
     34     # Things we pull in from all backends

ImportError: No module named backend_gtk3agg
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2015-11-09 14:02:54 -0600

skytux gravatar image

updated 2015-11-09 14:07:07 -0600

In Fedora 23, the GTK3 backend for Matplotlib is packaged separately, so you need to install it before using Matplotlib with this backend in Fedora 23:

$ sudo dnf install python-matplotlib-gtk3

I hope this saves you hours of troubleshooting because I spent hours looking for a workaround to this issue.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-11-09 14:00:38 -0600

Seen: 543 times

Last updated: Nov 09 '15