gsutil 错误 /bootstrapping/gsutil.py

gsutil 错误 /bootstrapping/gsutil.py

gsutil 给出了以下错误。它的最新版本安装在 Linux SUSE 12 上。你能帮我吗?

工具

Traceback (most recent call last):
  File "/root/google-cloud-sdk/bin/bootstrapping/gsutil.py", line 13, in <module>
    import bootstrapping
  File "/root/google-cloud-sdk/bin/bootstrapping/bootstrapping.py", line 46, in <module>
    from googlecloudsdk.core.updater import update_manager

  File "/root/google-cloud-sdk/lib/googlecloudsdk/core/updater/update_manager.py", line 36, in <module>
    from googlecloudsdk.core import yaml
  File "/root/google-cloud-sdk/lib/googlecloudsdk/core/yaml.py", line 31, in <module>
    from googlecloudsdk.core import yaml_location_value
  File "/root/google-cloud-sdk/lib/googlecloudsdk/core/yaml_location_value.py", line 39, in <module>
    from ruamel import yaml
  File "/usr/lib64/python2.7/site-packages/ruamel/yaml/__init__.py", line 81, in <module>
    from ruamel.yaml.main import *  # NOQA
  File "/usr/lib64/python2.7/site-packages/ruamel/yaml/main.py", line 6, in <module>
    from typing import List, Set, Dict, Tuple, Optional, Union, BinaryIO, IO, Any  # NOQA
ImportError: No module named typing

gcloud 版本:

Google Cloud SDK 272.0.0
bq 2.0.50
core 2019.11.16
gsutil 4.46

Python 版本:

$ python --version
Python 2.7.13

答案1

要安装 typing,请执行pip install typing。否则,您可以检查安装 gsutil文档中还有多个其他安装选项。

相关内容