Arhire Ionut
Arhire Ionut

Reputation: 460

Google Cloud App Engine: Cloud build failed at "python setup.py egg_info"

I'm trying to deploy a google cloud app engine app written in python3.6 using flask.

This is the error:

Step #1: Collecting pip==10.0.1 (from -r requirements.txt (line 1))
Step #1: Downloading https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl (1.3MB)
Step #1: Collecting Flask==0.12.2 (from -r requirements.txt (line 2))
Step #1: Downloading https://files.pythonhosted.org/packages/77/32/e3597cb19ffffe724ad4bf0beca4153419918e7fa4ba6a34b04ee4da3371/Flask-0.12.2-py2.py3-none-any.whl (83kB)
Step #1: Collecting gunicorn==19.7.1 (from -r requirements.txt (line 3))
Step #1: Downloading https://files.pythonhosted.org/packages/64/32/becbd4089a4c06f0f9f538a76e9fe0b19a08f010bcb47dcdbfbc640cdf7d/gunicorn-19.7.1-py2.py3-none-any.whl (111kB)
Step #1: Collecting oauth2client==4.1.2 (from -r requirements.txt (line 4))
Step #1: Downloading https://files.pythonhosted.org/packages/82/d8/3eab58811282ac7271a081ba5c0d4b875ce786ca68ce43e2a62ade32e9a8/oauth2client-4.1.2-py2.py3-none-any.whl (99kB)
Step #1: Collecting google-cloud (from -r requirements.txt (line 5))
Step #1: Downloading https://files.pythonhosted.org/packages/49/9a/943f0e217990c37e119101bbb739d86201ec1fdf59152ecc2dba93c5a8ad/google-cloud-0.33.0.tar.gz
Step #1: Complete output from command python setup.py egg_info:
Step #1: Traceback (most recent call last):
Step #1: File "<string>", line 1, in <module>
Step #1: File "/tmp/pip-build-agnydxp0/google-cloud/setup.py", line 22, in <module>
Step #1: with open(os.path.join(PACKAGE_ROOT, 'setup-README.rst')) as file_obj:
Step #1: FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-build-agnydxp0/google-cloud/setup-README.rst'
Step #1: 
Step #1: ----------------------------------------
Step #1: [91mCommand "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-agnydxp0/google-cloud/
Step #1: [0m[91mYou are using pip version 9.0.3, however version 10.0.1 is available.
Step #1: You should consider upgrading via the 'pip install --upgrade pip' command.[0m[91m
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:2357779cf996af7c1538a7035ab26073274de0d03e9eaf156e33083f5a90280a" failed: exit status 1
Step #1: [0m

I searched and found that the error occurs because of an outdated pip version. However, I put pip==10.0.1 in my requirements.txt but it still doesn't work.

Is there any way to run pip install --upgrade pip remotely? If so, how can I do that?

EDIT:

Here is my manifest file app.yaml:

runtime: python
env: flex
entrypoint: gunicorn -b :$PORT main:app

runtime_config:
  python_version: 3

manual_scaling:
  instances: 1
resources:
  cpu: 1
  memory_gb: 0.5
  disk_size_gb: 10

Upvotes: 2

Views: 1536

Answers (1)

Daniel
Daniel

Reputation: 46

I was having this problem earlier today, and I fixed it by installing only the google-cloud packages I needed (google-cloud-pubsub and google-cloud-storage in my case). It looks like the umbrella google-cloud package is deprecated anyway. Source: https://pypi.org/project/google-cloud/

WARNING: The google-cloud Python package is deprecated. On June 18, 2018, this package will no longer install any other packages. Please install the product-specific google-cloud-* packages needed for your application.

Upvotes: 3

Related Questions