Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conda installation fails with python 3.13 #2522

Open
tvwenger opened this issue Dec 4, 2024 · 4 comments
Open

conda installation fails with python 3.13 #2522

tvwenger opened this issue Dec 4, 2024 · 4 comments

Comments

@tvwenger
Copy link

tvwenger commented Dec 4, 2024

Describe the bug
Neither the conda installation instructions nor the pip installation instructions, both found on this page, are able install a working version of glue.

To Reproduce
First, conda via the glueviz channel:

conda update -n root conda
conda create -n glue -c conda-forge python pip
conda activate glue
conda install -c glueviz glueviz
python --version
# Python 3.13.0
glue --version

Traceback:

Traceback (most recent call last):
  File "/home/twenger/miniconda3/envs/glue/bin/glue", line 6, in <module>
    from glue.main import main
  File "/home/twenger/miniconda3/envs/glue/lib/python3.13/site-packages/glue/__init__.py", line 22, in <module>
    from .config import load_configuration
  File "/home/twenger/miniconda3/envs/glue/lib/python3.13/site-packages/glue/config.py", line 2, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'

Next, conda via the conda-forge channel:

conda deactivate
conda remove --all -n glue
conda create -n glue -c conda-forge python pip
conda activate glue
conda install -c conda-forge glueviz
python --version
# Python 3.13.0
glue --version

Error:

Command 'glue' not found, but can be installed with:
sudo apt install glueviz

Finally, pip:

conda deactivate
conda remove --all -n glue
conda create -n glue -c conda-forge python pip
conda activate glue
conda install -c conda-forge
pip install glueviz[all,qt]
# WARNING: glueviz 1.3.0 does not provide the extra 'all'
# WARNING: glueviz 1.3.0 does not provide the extra 'qt'
python --version
# Python 3.13.0
glue --version
# 1.21.1
glue

Traceback:

Traceback (most recent call last):
  File "/home/twenger/miniconda3/envs/glue/bin/glue", line 8, in <module>
    sys.exit(main())
             ~~~~^^
  File "/home/twenger/miniconda3/envs/glue/lib/python3.13/site-packages/glue_qt/main.py", line 253, in main
    start_glue(**kwargs)
    ~~~~~~~~~~^^^^^^^^^^
  File "/home/twenger/miniconda3/envs/glue/lib/python3.13/site-packages/glue_qt/main.py", line 145, in start_glue
    from glue_qt.utils.decorators import die_on_error
  File "/home/twenger/miniconda3/envs/glue/lib/python3.13/site-packages/glue_qt/utils/__init__.py", line 1, in <module>
    from .autocomplete_widget import *  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/twenger/miniconda3/envs/glue/lib/python3.13/site-packages/glue_qt/utils/autocomplete_widget.py", line 9, in <module>
    from qtpy import QtGui, QtWidgets
  File "/home/twenger/miniconda3/envs/glue/lib/python3.13/site-packages/qtpy/__init__.py", line 293, in <module>
    raise QtBindingsNotFoundError from None
qtpy.QtBindingsNotFoundError: No Qt bindings could be found

Expected behavior
Installation should proceed as advertised.

Details:

  • Operating System: Ubuntu/WSL
  • Python version (python --version): 3.13
  • Glue version (glue --version): Didn't work
  • How you installed glue: See above
@tvwenger tvwenger added the bug label Dec 4, 2024
@astrofrog
Copy link
Member

@tvwenger - thanks for reporting this! The installation instructions for conda were out of date, see the latest version here now:

http://docs.glueviz.org/en/stable/installation/conda.html

Essentially you should use the conda-forge channel instead of the glueviz channel.

For the pip installation, there was an issue with the glueviz meta-package. You should now be able to try again and it should work (but let me know if not!)

@tvwenger
Copy link
Author

tvwenger commented Dec 4, 2024

Thanks for the quick update to the docs @astrofrog ! I can confirm that the pip and conda installations proceed correctly alongside python 3.12.7 (note the other issue about python 3.13).

@dhomeier
Copy link
Collaborator

dhomeier commented Feb 11, 2025

reopening this since the conda issue still persists at least for Python 3.13. Fresh miniforge 24.11.3 installation with (default) python=3.13.1 fails with :

The following packages are incompatible
└─ glueviz is installable with the potential options
   ├─ glueviz 1.3.0 would require
   │  └─ python >=3.10,<3.11.0a0 , which can be installed;
   ├─ glueviz 1.3.0 would require
   │  └─ python >=3.11,<3.12.0a0 , which can be installed;
   ├─ glueviz 1.3.0 would require
   │  └─ python >=3.12,<3.13.0a0 , which can be installed;
   └─ glueviz 1.3.0 would require
      └─ python >=3.9,<3.10.0a0 , which can be installed.

3.12 (e.g. directly running mamba install glueviz) works, but installs some slightly older versions:

  + glue-core                                      1.21.1  pyhd8ed1ab_1             conda-forge      829kB
  + glue-vispy-viewers                              1.2.2  pyhd8ed1ab_0             conda-forge       91kB
  + glue-qt                                         0.2.0  unix_pyh707e725_0        conda-forge      352kB
  + glueviz                                         1.3.0  py312h81bd7bf_2          conda-forge       20kB

while pip install glueviz[all,qt] gives

glue-core==1.21.1
glue-qt==0.3.1
glue-vispy-viewers==1.2.2
glueviz==1.4.0

glue-qt still not updated (glue-viz/glue-qt#23), but the mamba version in contrast is > 1½ years old.

@dhomeier dhomeier reopened this Feb 11, 2025
@dhomeier dhomeier changed the title conda and pip installation fails with python 3.13 conda ~~and pip~~ installation fails with python 3.13 Feb 11, 2025
@dhomeier dhomeier changed the title conda ~~and pip~~ installation fails with python 3.13 conda ~and pip~ installation fails with python 3.13 Feb 11, 2025
@dhomeier dhomeier changed the title conda ~and pip~ installation fails with python 3.13 conda installation fails with python 3.13 Feb 11, 2025
@dhomeier
Copy link
Collaborator

Seems this comes down to glue-qt not being able to install for 3.13, which in turn is blocked through its dependencies on pyqt and qtconsole in conda (as well as probably the pin on 0.2.0 with other Python versions in conda).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants