【问题标题】:gsutil not working on mac and python3.5gsutil 在 mac 和 python3.5 上不起作用
【发布时间】:2016-01-31 04:14:06
【问题描述】:

我正在尝试使用 google 存储库,但是当我调用 gsutil 时出现错误...

使用 pip 安装 gsutil:

pip install gsutil

我当前的python版本是3.5

当我从命令行运行 gsutil 时,我收到以下错误:

class AbortException(StandardError): NameError: name 'StandardError' is not defined

不确定如何解决此问题...有什么想法吗?

编辑: 看起来使用 python 3.4 可以正常工作,尽管他们说 3x 不支持它...

【问题讨论】:

    标签: python-3.x google-cloud-storage gsutil


    【解决方案1】:

    现在似乎存在 Python3 支持:

    pip3 install gsutil

    为我工作

    【讨论】:

      【解决方案2】:

      来自gsutil System Requirements 文档:

      要使用 gsutil,您的电脑上必须安装 Python 2.6.x 或 2.7.x 计算机。 gsutil 目前不在 Python 3.x 上运行。

      【讨论】:

        【解决方案3】:

        因为 gsutil 仍然不支持 Python 3,所以我决定写一个替换:https://pypi.org/project/gs/。除了支持 Python 3 之外,它还可以用作 Python 库,并且对 gsutil 功能进行了一些其他改进(由 click 提供,CLI 帮助程序库)。

        【讨论】:

          猜你喜欢
          • 2013-07-11
          • 2022-01-24
          • 2014-08-06
          • 2018-11-25
          • 2019-01-19
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2014-11-07
          相关资源
          最近更新 更多