【发布时间】:2019-11-19 06:09:45
【问题描述】:
在https://cloud.google.com/appengine/docs/python/ 上,灵活的python 环境的运行时据说是3.6。但是在https://cloud.google.com/appengine/docs/flexible/python/runtime 上据说是 3.7。
据报告我的构建失败,因为它依赖于需要 3.7 的包(使用 gcloud app deploy)。所以至少我的构建使用的是 3.6。
这是文档中的错误还是 flex env 中也有 3.7?
更新 1
虽然反馈说 flex env 中的默认 python3 解释器是 3.7,但当我依赖于需要 3.7 的模块时尝试部署我的应用程序时确实出现了以下错误:
Step #1: <my-dep-module> requires Python '>=3.7' but the running Python is 3.6.8
当我删除该依赖项并构建时,我还看到构建输出中提到的 3.6:
Step #1: ---> f186f86e42ea Step #1: Step 2/9 : LABEL python_version=python3.6 Step #1: ---> Running in 7b76fdee165b
Step #1: Removing intermediate container 7b76fdee165b Step #1: ---> 482717f31b28
Step #1: Step 3/9 : RUN virtualenv --no-download /env -p python3.6 Step #1: ---> Running in b1d15ba3568d
Step #1: Running virtualenv with interpreter /opt/python3.6/bin/python3.6
因此不知何故 gcloud app deploy 仍在使用 3.6 构建?
【问题讨论】:
-
我认为你是对的,第二个链接的文档是错误的。我指定
python_version: 3并得到3.6.10 当我指定python_version: 3.7我得到3.7.2。根据引擎,当前有效值为'', '2', '3', '3.4', '3.5', '3.6', '3.7'