Apache beam(2.32.0)安装失败

2024-10-03 09:20:53 发布

您现在位置:Python中文网/ 问答频道 /正文

我们在部署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/

请注意,ApacheBeam的早期版本(如2.30.0)不依赖于“orjson”,这样做时它就可以正常工作

pip install apache-beam==2.30.0

我试图安装RUST,但由于某些“pysam”依赖性,它失败了。因此,我想知道安装“orjson”依赖项的正确方法是什么

我看到了orjson安装的GitHub问题,但没有从中找到太多。 https://github.com/readthedocs/readthedocs.org/issues/7687

//普拉萨德


Tags: installpiptoinbuild版本packageapache
2条回答

根据orjson文档,您需要将pip升级到20.3以上:

pip install  upgrade "pip>=20.3" # manylinux_x_y, universal2 wheel support
pip install  upgrade orjson

docs

orjson依赖项是在https://github.com/apache/beam/pull/14690/files中引入的。根据注释:orjson,仅在Python3.6及更高版本上可用。您可能需要检查您的python版本

相关问题 更多 >