[Python-modules-team] Bug#671363: ipython-qtconsole: Wrong dependency for ipython-qtconsole
Olivier Aubert
olivier.aubert at liris.cnrs.fr
Thu May 3 13:54:46 UTC 2012
Package: ipython-qtconsole
Version: 0.12-1
Severity: normal
Dear Maintainer,
While trying to test ipython-qtconsole, I stumbled on the following error message:
File "/usr/lib/python2.7/dist-packages/IPython/external/qt.py", line 62, in <module>
from PySide import QtCore, QtGui, QtSvg
ImportError: cannot import name QtGui
python-qt4 is installed (4.9.4) and python-pyside.qtcode as well (1.1.0-2).
This seems to be related to https://github.com/ipython/ipython/issues/655
since using the advised command line:
QT_API=pyqt ipython qtconsole
works. However, the patch mentionned in the cited bug report has been applied to the
ipython version that I am running (looking at the code), so it is not exactly the same
issue. In fact, there are missing dependencies (python3-pyside.qtgui and
python3-pyside.qtsvg). This comes from the fact that the dependencies are
wrongly expressed. The Depends: states
python3-pyqt4 | python3-pyside.qtcore,
python3-pyqt4 | python3-pyside.qtgui,
python3-pyqt4 | python3-pyside.qtsvg,
which (if the Depends: syntax allowed it, which is not the case) should rather be
python3-pyqt4 | ( python3-pyside.qtcore, python3-pyside.qtgui, python3-pyside.qtsvg)
or could be factorized as
python3-pyqt4 | ( python3-pyside.qtgui, python3-pyside.qtsvg)
since qtcore is required by qtgui and qtsvg.
I guess there is no immediate solution. Here are some ideas:
The pyside dependency could be expressed as
python3-pyqt4 | python-pyside
but this would bring a number of unneeded components.
A dummy package could be built, with dependencies on python3-pyside.qtcore,
python3-pyside.qtgui, python3-pyside.qtsvg, and then the Depends: would become
python3-pyqt4 | python4-pyside-gui-svg-required-dummy-package
but this is not clean at all.
Finally, the IPython/external/qt.py file could be patched to address this issue:
try to import QtGui/QtSvg is nothing was specified in the env. variable, and then
fallback on qtcore.
Regards,
Olivier
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 3.2.0-2-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Versions of packages ipython-qtconsole depends on:
ii ipython 0.12-1
ii python 2.7.2-10
ii python-pygments 1.5+dfsg-1
ii python-pyside.qtcore 1.1.0-2
ii python-qt4 4.9.1-1
ii python-zmq 2.1.11-1
ii python2.6 2.6.7-4
ii python2.7 2.7.2-8
ipython-qtconsole recommends no packages.
ipython-qtconsole suggests no packages.
-- no debconf information
More information about the Python-modules-team
mailing list