Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use mpl_toolkit.axes_grid1 together with GTK3 libraries/backend #4858

Closed
smheidrich opened this issue Aug 3, 2015 · 1 comment
Closed

Comments

@smheidrich
Copy link
Contributor

import matplotlib
matplotlib.use("Gtk3Agg")
from gi.repository import Gtk
import mpl_toolkits.axes_grid1

produces

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/mpl_toolkits/axes_grid1/__init__.py", line 4, in <module>
    from .axes_grid import Grid, ImageGrid, AxesGrid
  File "/usr/lib/python3/dist-packages/mpl_toolkits/axes_grid1/axes_grid.py", line 3, in <module>
    import matplotlib.pyplot as plt
  File "/usr/local/lib/python3.4/dist-packages/matplotlib-1.5.x-py3.4-linux-i686.egg/matplotlib/pyplot.py", line 103, in <module>
    _backend_selection()
  File "/usr/local/lib/python3.4/dist-packages/matplotlib-1.5.x-py3.4-linux-i686.egg/matplotlib/pyplot.py", line 97, in _backend_selection
    if gobject.MainLoop().is_running():
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 61, in __getattr__
    raise RuntimeError(_static_binding_error)
RuntimeError: When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject". See: https://bugzilla.gnome.org/show_bug.cgi?id=709183

Pretty self-explanatory. Can someone please fix this and make mpl_toolkits.axes_grid1 work nicely together with GTK3 libraries and backend?


Python version: 3.4.2
matplotlib version: 1.5.x

@smheidrich
Copy link
Contributor Author

Nevermind, I think this particular error has been fixed in the repository but is yet to be released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant