我正在尝试配置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 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
我做错了吗?
答案 0 :(得分:1)
这表明PyOpenSSL未正确安装。由于PyOpenSSL包含加密例程,因此Cloud SDK无法轻松打包它,我们依赖第三方安装。