【问题标题】:gcloud app deploy fails because of MarkupSafe由于 MarkupSafe,gcloud 应用部署失败
【发布时间】:2019-03-08 06:07:05
【问题描述】:

我正在使用“gcloud”将我的烧瓶应用程序部署到 GCP APP 引擎并收到以下错误:

Step #1: Collecting MarkupSafe==1.0 (from -r requirements.txt (line 6))
Step #1:   Downloading https://files.pythonhosted.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz
Step #1: Collecting pkg-resources==0.0.0 (from -r requirements.txt (line 7))
Step #1:   Could not find a version that satisfies the requirement pkg-resources==0.0.0 (from -r requirements.txt (line 7)) (from versions: )
Step #1: No matching distribution found for pkg-resources==0.0.0 (from -r requirements.txt (line 7))
Step #1: You are using pip version 9.0.3, however version 18.0 is available.
Step #1: You should consider upgrading via the 'pip install --upgrade pip' command.
Step #1: The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1
Finished Step #1
ERROR
ERROR: build step 1 "gcr.io/cloud-builders/docker@sha256:d1dda95e92c2290a0710a263d0b5fe9c0c9857130739af0e6962e4ed03e4b0b7" failed: exit status 1

似乎目标 VM 使用的是 PIP 9 而不是最新的 PIP 18。

有没有办法避免这个错误?

【问题讨论】:

    标签: google-app-engine google-cloud-platform


    【解决方案1】:

    好像是系统bug:Why does pip freeze list "pkg-resources==0.0.0"?

    解决方案是从 Flask 项目的“requirements.txt”中删除“pkg-resources==0.0.0”。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-08-14
      • 1970-01-01
      • 2017-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-03-03
      • 2021-12-24
      相关资源
      最近更新 更多