谷歌存储配置

2024-09-27 21:27:07 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图为Google的存储API配置gsutil命令行工具,但它似乎不喜欢它:

ahmeds:~ ahmed$ gsutil config
CommandException: OAuth2 is only supported when running under Python 2.6 or later
(unless additional dependencies are installed, see README for details);
you are running Python 2.7.2 (default, Nov 25 2011, 23:36:16) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)].
Use 'gsutil config -a' to create a config with Developer Key authentication credentials.

我会做错什么?我需要重新安装Python吗?在


Tags: 工具命令行buildapiconfigonlyisgoogle
3条回答

Gsutil在安装它的同一目录中查找它的依赖项(所有依赖项都捆绑在Gsutil安装包中)。知道这一点,这条线看起来很可疑:

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gslib/VERSION找不到。在

因为它表示试图从python站点包树中查找版本文件,这与上面提到的逻辑不一致。在我看来,您可能有一个未正确安装的gsutil包。我建议从头开始重新安装。如果重新安装后,您能够重现此问题,请发布您所遵循的安装步骤的简要摘要,以便我们可以尝试提供额外的帮助。在

我读了这些结构,我试着去,以我的情况来说没事。我认为您忘记设置环境变量^{cd1>}或在之后重新启动终端模拟器。请让我知道^{{cd2>}的输出

你试过: “使用'gsutil config-a'创建具有开发人员密钥身份验证凭据的配置” 就像建议的那样?在

相关问题 更多 >

    热门问题