【问题标题】:sudo pip3 install on google cloud functionssudo pip3 安装在谷歌云功能上
【发布时间】:2020-09-22 12:35:19
【问题描述】:

我有一个名为 kiteconnect 的模块,我想将它用于谷歌云功能。问题是普通的pip3 install kiteconnect 会抛出这个错误:

Deployment failure:
Build failed: `pip_download_wheels` had stderr output:
WARNING: Legacy build of wheel for 'kiteconnect' created no files.
Command arguments: /opt/python3.7/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-wheel-o4rwz7_o/kiteconnect/setup.py'"'"'; __file__='"'"'/tmp/pip-wheel-o4rwz7_o/kiteconnect/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-8rkohvc1
Command output: [use --verbose to show]
ERROR: Failed to build one or more wheels

error: `pip_download_wheels` returned code: 1; Error ID: 35132919

解决此错误的方法是使用sudo pip3 install kiteconnect,但我不确定如何通过用于云功能的requirements.txt 文件指定它。

有什么建议可以让我的功能正常工作吗?

【问题讨论】:

    标签: python-3.x google-cloud-platform pip google-cloud-functions requirements.txt


    【解决方案1】:

    错误表明您的依赖项之一是可卸载的。

    看起来kiteconnect 依赖项目前与 Python 3.7 不兼容,Python 3.7 是 Cloud Functions 在其运行时使用的 Python 版本:https://github.com/zerodhatech/pykiteconnect/issues/55

    您需要等到维护人员发布与 Python 3.7 兼容的新版本。

    【讨论】:

    • 嗨,达斯汀,我明白了。有没有办法 sudo pip3 installpip3 instal --user 依赖?这就是我如何让它在我的本地机器上运行。
    • 不,没有。这是 kiteconnect 的问题,而不是 Cloud Functions 的问题。
    猜你喜欢
    • 2021-04-12
    • 1970-01-01
    • 1970-01-01
    • 2018-12-11
    • 1970-01-01
    • 2017-11-14
    • 1970-01-01
    • 1970-01-01
    • 2018-06-19
    相关资源
    最近更新 更多