gpt4 book ai didi

python - Google Cloud Composer,无法安装 python-snappy

转载 作者:行者123 更新时间:2023-11-30 22:01:00 26 4
gpt4 key购买 nike

我正在尝试通过 Google Cloud Platform 控制台在 Google Cloud Composer 中安装 python-snappy。我使用的是python3环境。

我曾尝试安装不同的 python-snappy 版本(0.5.3、0.5.2、0.5.1、0.5、0.4),但是,它总是会引发此错误:

Http error status code: 400 Http error message: BAD REQUEST Additional errors: {"ResourceType":"w071b50175ee0733c-tp/asia-northeast1-kumparan-co-e2ca75b3-gae-typer:appengine.apps.services.versions.create","ResourceErrorCode":"400","ResourceErrorMessage":"Docker image gcr.io/w071b50175ee0733c-tp/c949bad3-ca30-4717-a975-8e36bae3929a was either not found, or is not in Docker V2 format. Please visit https://cloud.google.com/container-registry/docs/ui "}

我也尝试过重新运行,如下所述:https://groups.google.com/forum/#!topic/cloud-composer-discuss/jpxAGCPFkZo .

但是,就我而言,它并没有解决这个问题。

有人知道如何解决吗?

最佳答案

如果您导航至https://console.cloud.google.com/cloud-build/builds/ ,您应该会看到失败的构建,并显示以下日志:

Failed building wheel for python-snappy
Running setup.py clean for python-snappy
Failed to build python-snappy
Installing collected packages: python-snappy
Running setup.py install for python-snappy: started
Running setup.py install for python-snappy: finished with status 'error'
Complete output from command /usr/local/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-M5s4qk/python-snappy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-EuqCf8/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/snappy
copying snappy/snappy_cffi_builder.py -> build/lib.linux-x86_64-2.7/snappy
copying snappy/snappy_cffi.py -> build/lib.linux-x86_64-2.7/snappy
copying snappy/__main__.py -> build/lib.linux-x86_64-2.7/snappy
copying snappy/snappy_formats.py -> build/lib.linux-x86_64-2.7/snappy
copying snappy/snappy.py -> build/lib.linux-x86_64-2.7/snappy
copying snappy/hadoop_snappy.py -> build/lib.linux-x86_64-2.7/snappy
copying snappy/__init__.py -> build/lib.linux-x86_64-2.7/snappy
running build_ext
building 'snappy._snappy' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/snappy
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python2.7 -c snappy/snappymodule.cc -o build/temp.linux-x86_64-2.7/snappy/snappymodule.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
snappy/snappymodule.cc:31:22: fatal error: snappy-c.h: No such file or directory
#include <snappy-c.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1

这是因为 python-snappy 包只是与底层 C 库的 Python 绑定(bind),而不是 C 库本身。

参见"Error installing python-snappy: snappy-c.h: No such file or directory"了解更多详情。

关于python - Google Cloud Composer,无法安装 python-snappy,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54182517/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com