Skip to content

ruamel.yaml 0.17.32 version buggy for 0.1.22 singularity-hpc release #655

Open
@audreystott

Description

@audreystott

When installing -b 0.1.22 on Ubuntu 22.04, shpc appears to install successfully (lines have been omitted):

git clone -b 0.1.22 https://github.com/singularityhub/singularity-hpc.git
cd singularity-hpc
sudo python3 setup.py install
sudo pip3 install .
.
.
.
Searching for ruamel.yaml
Reading https://pypi.org/simple/ruamel.yaml/
Downloading https://files.pythonhosted.org/packages/d9/0e/2a05efa11ea33513fbdf4a2e2576fe94fd8fa5ad226dbb9c660886390974/ruamel.yaml-0.17.32-py3-none-any.whl#sha256=23cd2ed620231677564646b0c6a89d138b6822a0d78656df7abda5879ec4f447
Best match: ruamel.yaml 0.17.32
Processing ruamel.yaml-0.17.32-py3-none-any.whl
Installing ruamel.yaml-0.17.32-py3-none-any.whl to /usr/local/lib/python3.8/dist-packages
Adding ruamel.yaml 0.17.32 to easy-install.pth file

Installed /usr/local/lib/python3.8/dist-packages/ruamel.yaml-0.17.32-py3.8.egg
.
.
.
Successfully installed singularity-hpc-0.1.22

However, it seems the new ruamel version (0.17.32) causes an error when running the shpc config edit command (shpc --help is fine):

shpc config edit

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/shpc/utils/fileio.py", line 17, in <module>
    from ruamel_yaml import YAML
ModuleNotFoundError: No module named 'ruamel_yaml'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/shpc", line 8, in <module>
    sys.exit(run_shpc())
  File "/usr/local/lib/python3.8/dist-packages/shpc/client/__init__.py", line 519, in run_shpc
    from .config import main
  File "/usr/local/lib/python3.8/dist-packages/shpc/client/config.py", line 7, in <module>
    import shpc.defaults as defaults
  File "/usr/local/lib/python3.8/dist-packages/shpc/defaults.py", line 7, in <module>
    import shpc.utils as utils
  File "/usr/local/lib/python3.8/dist-packages/shpc/utils/__init__.py", line 1, in <module>
    from .fileio import (
  File "/usr/local/lib/python3.8/dist-packages/shpc/utils/fileio.py", line 19, in <module>
    from ruamel.yaml import YAML
ImportError: cannot import name 'YAML' from 'ruamel.yaml' (/usr/local/lib/python3.8/dist-packages/ruamel.yaml.clib-0.2.7-py3.8-linux-x86_64.egg/ruamel/yaml/__init__.py)

After installing ruamel.yaml 0.17.21 as follows, I can successfully run the shpc config edit command and also other shpc commands:

sudo pip3 install ruamel.yaml==0.17.21

Am I doing something wrong with my initial install commands?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions