小编Shr*_*rma的帖子

使用 SDK 在 Google Cloud 中设置环境变量时出错

我正在尝试为 Google Cloud 上的 Django 应用程序设置环境变量。我在SDK中输入了以下内容:

gcloud functions deploy env_vars --runtime python37 --set-env-vars SUBSCRIPTION_KEY=1234567890 --trigger-http
Run Code Online (Sandbox Code Playgroud)

返回的错误是:

ERROR: (gcloud.functions.deploy) OperationError: code=3, message=Build failed: {"error": {"canonicalCode": "INTERNAL", "errorMessage": "`pip_install_from_wheels` had stderr output:\n/opt/python3.7/bin/python3.7: No module named pip\n\nerror: `pip_install_from_wheels` returned code: 1", "errorType": "InternalError", "errorId": "ECB5F712"}}
Run Code Online (Sandbox Code Playgroud)

请帮忙。

我的requirements.txt文件:

Django==2.2.5
Pillow==6.2.1
azure-cognitiveservices-language-textanalytics==0.2.0
azure-cognitiveservices-nspkg==3.0.1
azure-cognitiveservices-search-newssearch==1.0.0 
azure-cognitiveservices-search-nspkg==3.0.1
azure-common==1.1.23
azure-nspkg==3.0.2
msrest==0.6.10
numpy==1.17.1
oauthlib==3.1.0
pandas==0.24.2
pandas-datareader==0.7.4
pip==19.0.3
requests==2.21.0
setuptools==40.8.0
sqlparse==0.3.0
statistics==1.0.3.5
ta==0.4.5
gunicorn==20.0.4
Run Code Online (Sandbox Code Playgroud)

python python-3.x google-cloud-platform gcloud google-cloud-functions

3
推荐指数
1
解决办法
676
查看次数