Gcloud应用部署提供了不支持Python 2.5的运行时错误
问题描述:
。这是相当老的版本。Gcloud应用部署提供了不支持Python 2.5的运行时错误
我的app.yaml说:
runtime: python
entrypoint: gunicorn -b :$PORT main:app
runtime_config:
python_version: 3
handlers:
- url: .*
script: main.app
根据https://cloudplatform.googleblog.com/2016/08/python-3-on-Google-App-Engine-flexible-environment-now-in-beta.html Python 3中应该可用。还是现在不是?
答
缺失部分是env: flex
所以,正确的YAML文件应该是这样的:
runtime: python
threadsafe: yes
env: flex
entrypoint: gunicorn -b :$PORT main:app
runtime_config:
python_version: 3
handlers:
- url: .*
script: main.app