I had some system updates for my manjaro installation and after that I get the following error message when trying to run gcloud
:
gcloud components update
Traceback (most recent call last):
File "/home/mani/Downloads/google-cloud-sdk/lib/gcloud.py", line 104, in <module>
main()
File "/home/mani/Downloads/google-cloud-sdk/lib/gcloud.py", line 62, in main
from googlecloudsdk.core.util import encoding
File "/home/mani/Downloads/google-cloud-sdk/lib/googlecloudsdk/__init__.py", line 23, in <module>
from googlecloudsdk.core.util import importing
File "/home/mani/Downloads/google-cloud-sdk/lib/googlecloudsdk/core/util/importing.py", line 23, in <module>
import imp
File "/usr/lib/python3.9/imp.py", line 23, in <module>
from importlib import util
File "/usr/lib/python3.9/importlib/util.py", line 2, in <module>
from . import abc
File "/usr/lib/python3.9/importlib/abc.py", line 17, in <module>
from typing import Protocol, runtime_checkable
File "/usr/lib/python3.9/typing.py", line 26, in <module>
import re as stdlib_re # Avoid confusion with the re we export.
File "/usr/lib/python3.9/re.py", line 124, in <module>
import enum
File "/home/mani/Downloads/google-cloud-sdk/lib/third_party/enum/__init__.py", line 26, in <module>
spec = importlib.util.find_spec('enum')
AttributeError: module 'importlib' has no attribute 'util'
After looking online I found that the problem could be that this version of gcloud
doesn't support python3.9 and the recommended solution was to run gcloud components update
but that gives the same error. Is there a way I could revert or make the command use an older python version to upgrade itself then go back to the new python 3.9?