我正在使用MacOS。
我使用了以下命令:
gcloud beta functions deploy start --runtime python37
--trigger-http --memory 2048MB --timeout 540s但是在部署google cloud functions时,我遇到了这样的错误:
(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我在我的requirements.txt中添加了scikit-image,这是以前没有添加的。在requirements.txt中未添加scikit-image时,代码已成功部署。
有什么想法吗?
发布于 2018-08-22 04:39:57
您的目录中是否有Pipfile文件?当我试图部署一个包含管道文件但没有附带Pipfile.lock的GCF时,我能够复制相同的错误。要修复此问题,请删除管道文件并仅包含requirements.txt,或者生成Pipfile.lock:
不带-- $ pipenv install -lock标志的跳跃
虽然目前的文档没有说明这一点,但我发现您完全可以在没有requirements.txt文件的情况下部署到GCF。只包含管道文件和Pipfile.lock。
简而言之,部署测试版GCF的可接受的依赖文件:
发布于 2020-10-06 22:55:04
根据谷歌云函数documentation,它只支持从requirements.txt文件安装依赖项。
并且文件Pipfile/Pipfile.lock不能出现在根目录中。
https://stackoverflow.com/questions/51839083
复制相似问题