Dear list,
I'm trying to to use matplotlib in a Qt application which needs the
sip API set to 2
import sip
sip.setapi('QString', 2)
However if I do this I get this error
ImportError: cannot import name QString
I'm wondering if I'm the first to stumble upon this one, or this is a
known solution.
Below the whole Traceback.
Thanks,
Michele.
In [3]: import sip
In [4]: sip.setapi('QString', 2)
In [5]: import matplotlib.pyplot as plt
---------------------------------------------------------------------------
ImportError Traceback (most recent call
last)
/home/mattions/Work/model/MSN/Neuronvisio/examples/<ipython console>
in <module>()
/usr/lib/pymodules/python2.6/matplotlib/pyplot.py in <module>()
93
94 from matplotlib.backends import pylab_setup
---> 95 new_figure_manager, draw_if_interactive, show = pylab_setup()
96
97 @docstring.copy_dedent(Artist.findobj)
/usr/lib/pymodules/python2.6/matplotlib/backends/__init__.pyc in
pylab_setup()
23 backend_name =
'matplotlib.backends.%s'%backend_name.lower()
24 backend_mod = __import__(backend_name,
---> 25 globals(),locals(),[backend_name])
26
27 # Things we pull in from all backends
/usr/lib/pymodules/python2.6/matplotlib/backends/backend_qt4agg.py in
<module>()
10
11 from backend_agg import FigureCanvasAgg
---> 12 from backend_qt4 import QtCore, QtGui, FigureManagerQT,
FigureCanvasQT,\
13 show, draw_if_interactive, backend_version, \
14 NavigationToolbar2QT
/usr/lib/pymodules/python2.6/matplotlib/backends/backend_qt4.py in
<module>()
14 from matplotlib.mathtext import MathTextParser
15 from matplotlib.widgets import SubplotTool
---> 16 import matplotlib.backends.qt4_editor.figureoptions as
figureoptions
17
18 try:
/usr/lib/pymodules/python2.6/matplotlib/backends/qt4_editor/figureoptions.py
in <module>()
9 import os.path as osp
10
---> 11 import matplotlib.backends.qt4_editor.formlayout as formlayout
12 from PyQt4.QtGui import QIcon
13
/usr/lib/pymodules/python2.6/matplotlib/backends/qt4_editor/formlayout.py
in <module>()
57 QDateEdit, QDateTimeEdit, QFont,
QFontComboBox,
58 QFontDatabase, QGridLayout)
---> 59 from PyQt4.QtCore import (Qt, SIGNAL, SLOT, QSize, QString,
60 pyqtSignature, pyqtProperty)
61 from datetime import date
ImportError: cannot import name QString
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users