spacetelescope / cubeviz

Data analysis package for cubes. https://cubeviz.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
15 stars 25 forks source link

Problem with testing the last release in Python 3.9 #598

Closed pllim closed 3 years ago

pllim commented 3 years ago

pip install cubeviz downgrades pyqt5, causing this message to appear when mosviz is also installed: ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. mosviz 0.3.1 requires pyqt5==5.12.3, but you have pyqt5 5.8 which is incompatible.

Running cubeviz command gave me this error in a clean conda env with Python 3.9 after I installed qt from conda. I failed to install PySide from both conda and pip; not sure why.

$ cubeviz
Traceback (most recent call last):
  File ".../python3.9/site-packages/qtpy/__init__.py", line 204, in <module>
    from PySide import __version__ as PYSIDE_VERSION  # analysis:ignore
ModuleNotFoundError: No module named 'PySide'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ".../cubeviz", line 5, in <module>
    from cubeviz.cubeviz import main
  File ".../cubeviz/__init__.py", line 38, in <module>
    from . import keyboard_shortcuts
  File ".../cubeviz/keyboard_shortcuts.py", line 2, in <module>
    from qtpy import QtCore, QtWidgets, QtGui, compat
  File ".../qtpy/__init__.py", line 210, in <module>
    raise PythonQtError('No Qt bindings could be found')
qtpy.PythonQtError: No Qt bindings could be found
pllim commented 3 years ago

In Python 3.6, I still see the same "pip's dependency resolver..." message when mosviz is also installed, but the splash screen shows.

ibusko commented 3 years ago

The original JIRA ticket is JDAT-1296.

eteq commented 3 years ago

In some out-of-band discussion, I think we settled on the following solution:

pllim commented 3 years ago

I see that there is a very specific pinning here:

https://github.com/spacetelescope/cubeviz/blob/c23e48113afa6ba4971bf483c4c50c9402383f0e/setup.cfg#L16

But I am not sure if it works because pip install cubeviz pulls in cubeviz 0.3.1 and specviz 0.7.0 into Python 3.9 env. 🤯

And the official doc has no example. 🤦 https://setuptools.readthedocs.io/en/latest/userguide/dependency_management.html#python-requirement "Example WIP"

pllim commented 3 years ago

Okay... now I am very confused... https://pypi.org/project/cubeviz/#history shows releases up to 0.3.3 but the tags on this repo only goes up to 0.3.0.

Actually... 0.3.2 is completely missing both in the repo and also on PyPI. 🤷

pllim commented 3 years ago

Regardless, now I don't quite see the value in releasing anything with max Python version pinning, as the resolver will just grab the last (and older) release without this pin for newer Python versions, which is even worse.

I will proceed to just lift the python_requires pin and gut this package out.