我正在尝试为 Google Cloud Storage 存储桶对象更改配置通知,但是在尝试使 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.
我按照此说明获取 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
难道我做错了什么?