You are not logged in.
Hi there,
I've installed ipython, numpy, scipy, matplotlib, python-pyzmq, python-jinja, python-tornado and pygtk out of the repos.
In python interactive (or upon starting ipython --pylab), I get the error
Python 3.3.3 (default, Nov 26 2013, 13:33:18)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pylab as pl
Traceback (most recent call last):
File "/usr/lib/python3.3/site-packages/matplotlib/backends/backend_gtk.py", line 12, in <module>
import gobject
ImportError: No module named 'gobject'During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.3/site-packages/pylab.py", line 1, in <module>
from matplotlib.pylab import *
File "/usr/lib/python3.3/site-packages/matplotlib/pylab.py", line 269, in <module>
from matplotlib.pyplot import *
File "/usr/lib/python3.3/site-packages/matplotlib/pyplot.py", line 98, in <module>
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "/usr/lib/python3.3/site-packages/matplotlib/backends/__init__.py", line 28, in pylab_setup
globals(),locals(),[backend_name],0)
File "/usr/lib/python3.3/site-packages/matplotlib/backends/backend_gtkagg.py", line 10, in <module>
from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK, FigureCanvasGTK,\
File "/usr/lib/python3.3/site-packages/matplotlib/backends/backend_gtk.py", line 16, in <module>
raise ImportError("Gtk* backend requires pygtk to be installed.")
ImportError: Gtk* backend requires pygtk to be installed.But pygtk is installed!
I've Goggled, and only found a year old problem that was supposedly fixed. Does anyone have any suggestions?
EDIT: change 'closed' to 'solved' in the subject ~fukawi2
EDIT: changed 'solved' to 'unsolved', for accuracy.
Last edited by timtro (2014-04-16 23:59:29)
Offline
Thought I had it solved, but then I tried
ipython --matplotlib Gtkand I get the same error.
I can import pygtk.
Looking at /usr/lib/python3.3/site-packages/matplotlib/backends/backend_gtk.py it's throwing here:
try:
import gobject
import gtk; gdk = gtk.gdk
import pango
except ImportError:
raise ImportError("Gtk* backend requires pygtk to be installed.")So, it's trying to import gtk. Is this some sort of version problem?
Last edited by timtro (2014-01-10 20:14:22)
Offline
Please remember to mark the thread as solved https://bbs.archlinux.org/viewtopic.php?id=130309
Offline
Please remember to mark the thread as solved https://bbs.archlinux.org/viewtopic.php?id=130309
It's not so solved as I thought. I will though.
Offline
It seems to be an upstream error. The Python3 port of Matplotlib is still in a transitional state afaict.
Incidentally, please place your code
inside code tagsto increase the legibility of your posts.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
It seems to be an upstream error. The Python3 port of Matplotlib is still in a transitional state afaict.
Incidentally, please place your code
inside code tagsto increase the legibility of your posts.
Done. Thanks.
Offline
Don't use '[closed]', but e.g. [solved]. 'closed' means a moderator closed the thread and you can't post here anymore.
Offline
For anyone still having this problem, the line
backend : Qt4Aggin ~/.config/matplotlib/matplotlibrc seems to solve the problem.
Offline