<div dir="ltr">After a recent upgrade on arch linux (where I have been using ipython for years), I just encountered the following problem when I start ipython (2.3.1) with "ipython2 qtconsole --pylab"<br><br><p style="margin:0px;text-indent:0px">Using matplotlib backend: Qt5Agg</p>
<p style="margin:0px;text-indent:0px">ERROR:tornado.application:Exception in callback <functools.partial object at 0x7fcac006c838></p>
<p style="margin:0px;text-indent:0px">Traceback (most recent call last):</p>
<p style="margin:0px;text-indent:0px">  File "/usr/lib/python2.7/site-packages/tornado/ioloop.py", line 565, in _run_callback</p>
<p style="margin:0px;text-indent:0px">    ret = callback()</p>
<p style="margin:0px;text-indent:0px">  File "/usr/lib/python2.7/site-packages/tornado/stack_context.py", line 275, in null_wrapper</p>
<p style="margin:0px;text-indent:0px">    return fn(*args, **kwargs)</p>
<p style="margin:0px;text-indent:0px">  File "/usr/lib/python2.7/site-packages/IPython/kernel/zmq/ipkernel.py", line 262, in enter_eventloop</p>
<p style="margin:0px;text-indent:0px">    self.eventloop(self)</p>
<p style="margin:0px;text-indent:0px">  File "/usr/lib/python2.7/site-packages/IPython/kernel/zmq/eventloops.py", line 71, in loop_qt5</p>
<p style="margin:0px;text-indent:0px">    return loop_qt4(kernel)</p>
<p style="margin:0px;text-indent:0px">  File "/usr/lib/python2.7/site-packages/IPython/kernel/zmq/eventloops.py", line 60, in loop_qt4</p>
<p style="margin:0px;text-indent:0px">    kernel.app = get_app_qt4([" "])</p>
<p style="margin:0px;text-indent:0px">  File "/usr/lib/python2.7/site-packages/IPython/lib/guisupport.py", line 111, in get_app_qt4</p>
<p style="margin:0px;text-indent:0px">    from IPython.external.qt_for_kernel import QtGui</p>
<p style="margin:0px;text-indent:0px">  File "/usr/lib/python2.7/site-packages/IPython/external/qt_for_kernel.py", line 84, in <module></p>
<p style="margin:0px;text-indent:0px">    from IPython.external.qt import QtCore, QtGui, QtSvg, QT_API</p>
<p style="margin:0px;text-indent:0px">  File "/usr/lib/python2.7/site-packages/IPython/external/qt.py", line 17, in <module></p>
<p style="margin:0px;text-indent:0px">    (QT_API, QT_API_PYSIDE, QT_API_PYQT))</p>
<p style="margin:0px;text-indent:0px">RuntimeError: Invalid Qt API 'pyqt5', valid values are: 'pyside', 'pyqt'</p><p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px">If I start with "ipython2 qtconsole" and then do <br></p><br>%matplotlib inline 
<p style="margin:0px;text-indent:0px"><span style="color:rgb(0,0,128)"></span><span style="font-weight:600;color:rgb(0,0,128)"></span><span style="color:rgb(0,0,128)"></span>import matplotlib.pyplot</p><p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px">then plotting works fine. <br></p><p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px">I am guessing that this is something that arises only with arch, and has something to do with its packages for python Qt bindings. <br></p><p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px">Here are some of other relevant packages I am using<br></p><p style="margin:0px;text-indent:0px">python2-matplotlib 1.4.2-3</p><p style="margin:0px;text-indent:0px">python2-pyqt4 4.11.3-1<br>python2-pyqt5 5.4.0-2</p><p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px">It is not a major hassle but it would be good know what is causing this. <br></p><p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px">-m</p><p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px">ps. ipython2 is arch linux's name for ipython 2.x, while the name ipython is for ipython 3.x.<br></p></div>