apache / apache/openwhisk

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

Open
#5,523 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Scala
Stars
6.8k
Forks
1.2k
Avg merge
2d 14h
Merged PRs (30d)
2

Description

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
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
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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.