gpt4 book ai didi

python - 从 GCloud 激活服务帐户

转载 作者:太空宇宙 更新时间:2023-11-04 06:03:07 25 4
gpt4 key购买 nike

我正在尝试配置 notification for a Google Cloud Storage bucket object change但是,当我试图让 gsutil 通过此命令使用服务帐户时,我遇到了困难。

gcloud auth activate-service-account service-account-email --key-file path/to/key.p12

我在命令行中得到的错误是:

ERROR: (gcloud.auth.activate-service-account) PyOpenSSL is not available. If you have already installed PyOpenSSL, you will need to enable site packages by setting the environment variable CLOUDSDK_PYTHON_SITEPACKAGES to 1. If that does not work, See https://developers.google.com/cloud/sdk/crypto for details.

我关注了this instructions to get pyOpenSSL .如果我向 pip 询问该软件包,它会告诉我它已安装

$ pip show pyopenssl
---
Name: pyOpenSSL
Version: 0.14
Location: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
Requires: cryptography, six

如果我调用 env 命令,我也会看到环境变量

$ env
...
CLOUDSDK_PYTHON_SITEPACKAGES=1

我做错了什么吗?

最佳答案

这表明 PyOpenSSL 没有正确安装。由于PyOpenSSL包含cryptoroutine,Cloud SDK无法轻松打包,依赖第三方安装。

关于python - 从 GCloud 激活服务帐户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23682687/

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