glue-viz / glue

Linked Data Visualizations Across Multiple Files
http://glueviz.org
Other
742 stars 153 forks source link

Missing pyqt5 requirements #2336

Closed mfouesneau closed 2 years ago

mfouesneau commented 2 years ago

Describe the bug at the installation stage, there is a missing PyQt5 requirement

To Reproduce

> pip install glueviz
> glue
ModuleNotFoundError: No module named 'PyQt5'
dhomeier commented 2 years ago

Does this persist when using one of the recommended installation commands for pip pip install glueviz[recommended,qt] or pip install glueviz[all,qt]?

astrofrog commented 2 years ago

PyQt5 is deliberately missing as a required dependency because we want to let people decide if they would prefer to install PyQt5/PyQt6/PySide5/PySide5 - but indeed if you specify [qt] as @dhomeier mentioned then you will get PyQt5.

mfouesneau commented 2 years ago

I did not have options from my perspective. The error message was asking for QT. Maybe some guidance would be helpful.

Thanks.

dhomeier commented 2 years ago

The installation options and their reasoning are explained in the install docs. I agree the error message is not very helpful, as it might explain as well that one (at least) of the supported backends is needed, but this is emitted from QtPy and not under out control. Since QtPy functions as a generic abstraction layer to the various PyQt and PySide libraries, it could provide a more helpful message, or even ensure that at least one of these dependencies is installed. What might be possible is to intercept that error when we try to import QtPy and replace the message with an instruction to install any of the supported backends.