gpt4 book ai didi

python - gsutil 不再有效?

转载 作者:太空狗 更新时间:2023-10-29 20:17:57 28 4
gpt4 key购买 nike

我已经使用 gcloud 和 gsutil 一段时间了,但现在我运行的任何 gsutil 命令突然出现错误:

Traceback (most recent call last):  File "/Users/julian/google-cloud-sdk/bin/bootstrapping/gsutil.py", line 12, in     import bootstrapping  File "/Users/julian/google-cloud-sdk/bin/bootstrapping/bootstrapping.py", line 22, in     from googlecloudsdk.core.credentials import store as c_store  File "/Users/julian/google-cloud-sdk/lib/googlecloudsdk/core/credentials/store.py", line 27, in     from googlecloudsdk.core import http  File "/Users/julian/google-cloud-sdk/lib/googlecloudsdk/core/http.py", line 31, in     from googlecloudsdk.core.resource import session_capturer  File "/Users/julian/google-cloud-sdk/lib/googlecloudsdk/core/resource/session_capturer.py", line 32, in     from googlecloudsdk.core.resource import yaml_printer  File "/Users/julian/google-cloud-sdk/lib/googlecloudsdk/core/resource/yaml_printer.py", line 17, in     from googlecloudsdk.core.resource import resource_printer_base  File "/Users/julian/google-cloud-sdk/lib/googlecloudsdk/core/resource/resource_printer_base.py", line 38, in     from googlecloudsdk.core.resource import resource_projector  File "/Users/julian/google-cloud-sdk/lib/googlecloudsdk/core/resource/resource_projector.py", line 34, in     from google.protobuf import json_format as protobuf_encodingImportError: cannot import name json_format

我尝试了 gcloud update 和 gcloud reinstall 但仍然遇到同样的问题。是不是和python安装有冲突?还有其他想法吗?

最佳答案

您也可以通过更新到最新版本的 protobuf 来修复此错误。那么您就不必降级 gcloud。

pip install protobuf --upgrade

关于python - gsutil 不再有效?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47200623/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com