apt-get 升级 google-cloud-sdk 引发错误

apt-get 升级 google-cloud-sdk 引发错误

在 Ubuntu 18.04 上通过 apt-get 更新 Google Cloud SDK 时,我还没有找到报告这些错误的方法,因此在这里发布它们。

Setting up google-cloud-sdk (274.0.0-0) ...
Compiling platform/bq/third_party/yaml/lib3/__init__.py ...
File "platform/bq/third_party/yaml/lib3/__init__.py", line 284
class YAMLObject(metaclass=YAMLObjectMetaclass):
                          ^
SyntaxError: invalid syntax

...

Processing triggers for google-cloud-sdk (274.0.0-0) ...
Compiling platform/bq/third_party/yaml/lib3/__init__.py ...
  File "platform/bq/third_party/yaml/lib3/__init__.py", line 284
    class YAMLObject(metaclass=YAMLObjectMetaclass):
                              ^
SyntaxError: invalid syntax

Setting up google-cloud-sdk-app-engine-go (274.0.0-0) ...
Processing triggers for google-cloud-sdk (274.0.0-0) ...
Compiling platform/bq/third_party/yaml/lib3/__init__.py ...
  File "platform/bq/third_party/yaml/lib3/__init__.py", line 284
    class YAMLObject(metaclass=YAMLObjectMetaclass):
                              ^
SyntaxError: invalid syntax

答案1

使用 Python 3 而不是 Python 2.x 版本

相关内容