The CPython documentation says about collections.Mapping
and other abstract base classes:
Deprecated since version 3.3, will be removed in version 3.10: Moved Collections Abstract Base Classes to the collections.abc module.
Fedora 35 uses CPython 3.10 as its default Python interpreter. Here, invoking Google’s gcloud
CLI fails with
ERROR: gcloud failed to load: module 'collections' has no attribute 'Mapping'
Observed with Google Cloud SDK release 363.0.0 (2021-11-02).
I addressed this by installing Python 2.7 and then instructing gcloud to use that:
$ sudo dnf install python2.7
$ export CLOUDSDK_PYTHON="/usr/bin/python2"
$ gcloud
I reported that here.
Leave a Reply