Reputation: 11
I am using MacOS
.
I used following command:
gcloud beta functions deploy start --runtime python37
--trigger-http --memory 2048MB --timeout 540s
But while deploying google cloud functions
I got this error:
(gcloud.beta.functions.deploy) OperationError: code=3, message=Build failed: USER ERROR:
pip_download_wheels had stderr output:
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-wheel-8b_hn74q/PyWavelets/
error: pip_download_wheels returned code: 1
I added scikit-image
in my requirements.txt
, which was not added before. Code was successfully deploying when scikit-image
was not added in requirements.txt
.
Any ideas?
Upvotes: 1
Views: 1472
Reputation: 11
According to the google cloud function documentation it only supports installing dependency from requirements.txt
file.
And the file Pipfile/Pipfile.lock
must not be present in the root directory.
Upvotes: 1
Reputation: 4296
Do you have a Pipfile in your directory? I was able to replicate this same error when I tried to deploy a GCF containing a Pipfile but no accompanying Pipfile.lock. To fix, either remove Pipfile and just include requirements.txt, or generate Pipfile.lock:
$ pipenv install
without the --skip-lock flag
While the current documentation does not state this, I have found that you can deploy to GCF without a requirements.txt file at all. Just include Pipfile and Pipfile.lock.
To recap, acceptable dependency files to deploy a beta GCF:
Upvotes: 3