Opened 5 years ago

Last modified 5 years ago

#58571 assigned defect

py36-qtconsole should depend on QT python bindings

Reported by: hsgg (Henry Gebhardt) Owned by: stromnov (Andrey Stromnov)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: py-qtconsole

Description

Hi, after asking my university's IT department to install py36-qtconsole, it turns out that QT bindings need to be installed separately, e.g. py36-pyqt5.

This bug report is for py36-*, but I assume the other python versions need a similar dependency added.

Thank you!

Expected result: Open a qtconsole window.

Actual results:

$ jupyter-qtconsole-3.6 
Traceback (most recent call last):
  File "/opt/local/bin/jupyter-qtconsole-3.6", line 2, in <module>
    from qtconsole.qtconsoleapp import main
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/qtconsole/qtconsoleapp.py", line 60, in <module>
    from qtconsole.qt import QtCore, QtGui
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/qtconsole/qt.py", line 23, in <module>
    QtCore, QtGui, QtSvg, QT_API = load_qt(api_opts)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/qtconsole/qt_loaders.py", line 387, in load_qt
    api_options))
ImportError: 
    Could not load requested Qt binding. Please ensure that
    PyQt4 >= 4.7, PyQt5, PySide >= 1.0.3 or PySide2 is available,
    and only one is imported per session.

    Currently-imported Qt library:   None
    PyQt4 installed:                 False
    PyQt5 installed:                 False
    PySide >= 1.0.3 installed:       False
    PySide2 installed:               False
    Tried to load:                   ['pyqt5', 'pyside2', 'pyside', 'pyqt']

Change History (4)

comment:1 Changed 5 years ago by jmroot (Joshua Root)

Owner: set to stromnov
Status: newassigned

comment:2 Changed 5 years ago by stromnov (Andrey Stromnov)

https://github.com/macports/macports-ports/blob/9a515376a2a758aa0322c0ae9fadd24dda4d0dec/python/py-qtconsole/Portfile#L37-L38

It's not a bug, but a side effect of Jupyter QT Console runtime backend selection nature. There is no easy way to pin py-qtconsole to one preselected QT backend at build time, so it's better to provide good notes section.

comment:3 in reply to:  2 Changed 5 years ago by hsgg (Henry Gebhardt)

Thank you for the explanation. Seems like this would need support from the package manager for alternative dependencies. I leave it to you to close or otherwise handle this bug. Thanks!

comment:4 Changed 5 years ago by mf2k (Frank Schima)

Port: py-qtconsole added; py36-qtconsole removed
Note: See TracTickets for help on using tickets.