|
From: Darren D. <dsd...@gm...> - 2011-01-03 15:28:19
|
On Mon, Jan 3, 2011 at 9:45 AM, Ryan May <rm...@gm...> wrote: > On Sun, Jan 2, 2011 at 12:24 PM, Xavier Gnata <xav...@gm...> wrote: >> which backend should we use? >> It does not work with pyqt4 >> >> Traceback (most recent call last): >> File "<stdin>", line 1, in <module> >> File "/usr/local/lib/python3.1/dist-packages/pylab.py", line 1, in >> <module> >> from matplotlib.pylab import * >> File "/usr/local/lib/python3.1/dist-packages/matplotlib/pylab.py", >> line 259, in <module> >> from matplotlib.pyplot import * >> File "/usr/local/lib/python3.1/dist-packages/matplotlib/pyplot.py", >> line 95, in <module> >> new_figure_manager, draw_if_interactive, show = pylab_setup() >> File >> "/usr/local/lib/python3.1/dist-packages/matplotlib/backends/__init__.py", line >> 25, in pylab_setup >> globals(),locals(),[backend_name]) >> File >> "/usr/local/lib/python3.1/dist-packages/matplotlib/backends/backend_qt4agg.py", >> line 12, in <module> >> from .backend_qt4 import QtCore, QtGui, FigureManagerQT, >> FigureCanvasQT,\ >> File >> "/usr/local/lib/python3.1/dist-packages/matplotlib/backends/backend_qt4.py", >> line 16, in <module> >> import matplotlib.backends.qt4_editor.figureoptions as figureoptions >> File >> "/usr/local/lib/python3.1/dist-packages/matplotlib/backends/qt4_editor/figureoptions.py", >> line 11, in <module> >> import matplotlib.backends.qt4_editor.formlayout as formlayout >> File >> "/usr/local/lib/python3.1/dist-packages/matplotlib/backends/qt4_editor/formlayout.py", >> line 59, in <module> >> from PyQt4.QtCore import (Qt, SIGNAL, SLOT, QSize, QString, >> ImportError: cannot import name QString >> >> Looks like this backend hasn't been ported yet. > > I remember seeing this on Gentoo and, unfortunately, never tracked it > down. However, it seems to me this is a problem with your PyQt4 > install and Python 3, as QString should be found. It's not a problem with the PyQt4 installation. PyQt on python-3 uses PyQt's new API, which uses python strings and does not provide QString, QChar, and friends. http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/pyqt4ref.html#selecting-incompatible-apis Darren |