python-3.x - Gcloud 应用程序部署出现不受支持的 Python 2.5 运行时错误

标签 python-3.x google-cloud-platform windows-10-desktop

当我在项目文件夹中运行 gcloud app deploy 时,出现以下错误:

ERROR: Service [None] uses unsupported Python 2.5 runtime. Please use [runtime: python27] instead.
ERROR: (gcloud.app.deploy) Errors occurred while parsing the App Engine app configuration.

但我非常怀疑我是否有任何 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

关于python-3.x - Gcloud 应用程序部署出现不受支持的 Python 2.5 运行时错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43820293/

相关文章:

python - 如何从子文件夹访问路径级别以下的文件

python - 在 Python 3 中获取两个列表之间的交集

python - 如何测试 Flask 使用的是 test_client 而不是 client?

java - Spring 启动+gcloud+ "502 Bad Gateway"

google-cloud-platform - GCP - 无法打印身份 token

python - Windows 10 pip 安装 'Failed Connection'

python - 在 Google 云存储桶中使用 PIL 更改图像大小(从 GCloud 中的虚拟机)

java - 我无法在 Windows 10 计算机中安装 Java

powershell - Windows 10 应用程序问题。启动和 Cortana 卡住

java - 从源代码构建 Netbeans 11.0 时出错