我们在部署我们的GCP数据流管道时遇到了一些问题。经过分析,发现最新版本的apache-beam在安装时存在一些问题。为了复制这个问题,我创建了一个virtualenv并运行以下命令
pip install apache-beam==2.32.0
以下错误在安装'orjson‘依赖项时开始弹出,
Using cached orjson-3.6.3.tar.gz (548 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: 'c:\temp\virtu\scripts\python.exe' 'c:\temp\virtu\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\prasasaw\AppData\Local\Temp\tmpmekx1jjj'
cwd: C:\Users\prasasaw\AppData\Local\Temp\pip-install-0yofoe55\orjson_62f1ca2674934a7f8c45b08e87e05a4b
Complete output (6 lines):
Cargo, the Rust package manager, is not installed or is not on PATH.
This package requires Rust and Cargo to compile extensions. Install it through
the system's package manager or via https://rustup.rs/请注意,像2.30.0这样的Apache 2.30.0的早期版本没有对'orjson‘的依赖,当您这样做时,它工作得很好。
pip install apache-beam==2.30.0
我试图安装RUST,但由于一些'pysam‘依赖,它失败了。所以我想知道安装'orjson‘依赖的正确方式是什么
我在orjson安装中看到了这个GitHub问题,但是没有从中找到很多东西。https://github.com/readthedocs/readthedocs.org/issues/7687
//Prasad。
发布于 2021-09-23 21:03:24
orjson依赖项是在https://github.com/apache/beam/pull/14690/files中引入的。根据评论: orjson,仅适用于Python 3.6及更高版本。您可能需要检查您的python版本。
发布于 2021-10-01 18:59:14
根据orjson文档,您需要将pip升级到20.3以上:
pip install --upgrade "pip>=20.3" # manylinux_x_y, universal2 wheel support
pip install --upgrade orjson(docs)
发布于 2021-12-07 15:53:24
我参加聚会有点晚了,但我今天也遇到了这个问题。我通过切换到64位Python环境解决了这个问题(我意外地安装了32位)。
https://stackoverflow.com/questions/69305399
复制相似问题