I had been happily using the gcloud cli on my macbook running on macOS Monterey version 12.4
I did a brew upgrade
which seems to have broken the gcloud cli, its either the brew upgrade
or a python install which I did, any info on how to narrow this down would be appreciated.
Since I installed the google-cloud-sdk
with brew
I could uninstall it with brew uninstall google-cloud-sdk
However, I'm still unable to remove the gcloud
binary(?) and I constantly get show the following stack trace
Running gcloud -h
produces the following error (please note this after I uninstalled the google-cloud-sdk
)
ERROR: gcloud failed to load: module 'collections' has no attribute 'Mapping'
gcloud_main = _import_gcloud_main()
import googlecloudsdk.gcloud_main
from googlecloudsdk.calliope import cli
from googlecloudsdk.calliope import actions
from googlecloudsdk.calliope import markdown
from googlecloudsdk.calliope import usage_text
from googlecloudsdk.calliope import parser_arguments
from googlecloudsdk.calliope import parser_completer
from googlecloudsdk.core.console import progress_tracker
class _BaseStagedProgressTracker(collections.Mapping):
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:
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3
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 reinstall the Cloud SDK using the instructions here:
https://cloud.google.com/sdk/
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3
is a valid path and running it gives me the following output
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 -V
Python 3.10.5
I would like to be able to clean up the installation and get it back to a working state as I use the cloud_sql_proxy
component to be able to connect to databases in GCP regularly for development purposes.
Please let me know if further information is needed.
Any help and insights would be very helpful.
Thanks in advance