由于MarkupSafe,gcloud应用程序部署失败

时间:2018-10-03 04:37:25

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

我正在使用“ gcloud”将Flask应用程序部署到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。

反正我可以避免该错误吗?

1 个答案:

答案 0 :(得分:0)

似乎是系统错误:doc

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

相关问题