This evening I was working on some development for which I depend on the gcloud sdk for.
It seems that the recent python update has broken my installation for it’s unable to find a working version of python.
Below is the output when trying to invoke the cloudsdk cli:
> gcloud
ERROR: (gcloud) Command name argument expected.
ERROR: gcloud failed to load (gcloud.interactive): Problem loading gcloud.interactive: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py).
This usually indicates corruption in your gcloud installation or problems with your Python interpreter.
Please verify that the following is the path to a working Python 2.7 or 3.5+ executable:
/usr/bin/python
If it is not, please set the CLOUDSDK_PYTHON environment variable to point to a working Python 2.7 or 3.5+ executable.
If you are still experiencing problems, please run the following command to reinstall:
$ gcloud components reinstall
If that command fails, please reinstall the Cloud SDK using the instructions here:
https://cloud.google.com/sdk/
I’ve tried a fresh download of the archive, ran the gcloud components reinstall
comment, and also tried setting the CLOUDSDK_PYTHON env var. None of the above worked.
If anyone else has experienced this and found a solution, posting a solution would be very much appreciated.