Skip to content

ImportError: cannot import name 'Sequence' from 'collections' #5523

Open
@Suraez

Description

@Suraez

When running all.sh script inside the tools/ubuntu-setup, i got the following errors, I have got this error on almost all Ubuntu machines

Ubuntu OS: 22.04.5
Python Version: 3.10.12
Pip Version: 24.3.1

+ ansible --version
/home/suraj/openwhisk/tools/ubuntu-setup/newenv/bin/ansible:26: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources
Traceback (most recent call last):
  File "/home/suraj/openwhisk/tools/ubuntu-setup/newenv/bin/ansible", line 40, in <module>
    from ansible.errors import AnsibleError, AnsibleOptionsError, AnsibleParserError
  File "/home/suraj/openwhisk/tools/ubuntu-setup/newenv/lib/python3.10/site-packages/ansible/errors/__init__.py", line 22, in <module>
    from collections import Sequence
ImportError: cannot import name 'Sequence' from 'collections' (/usr/lib/python3.10/collections/__init__.py)

when i use python version less than 3.10, then error goes away. My question is do i need to have python version lesser than 3.10 in order to install the OpenWhisk?

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