1

I am using "gcloud" to deploy my flask application to GCP APP engine and got the following error:

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

It seems the target VM is using PIP 9 instead of the latest PIP 18.

Is there anyway I can avoid the error?

derek
  • 9,358
  • 11
  • 53
  • 94

1 Answers1

0

It seems it is a system bug: Why does pip freeze list "pkg-resources==0.0.0"?

The solution is to delete "pkg-resources==0.0.0" from "requirements.txt" in your Flask project.

derek
  • 9,358
  • 11
  • 53
  • 94