【问题标题】:pip install pyarrow failing in Linux / Inside a dockerpip install pyarrow 在 Linux 中失败/在 docker 内部
【发布时间】:2021-03-05 22:55:08
【问题描述】:

我尝试安装 pyarrow,但由于以下错误而失败。我还尝试了选项 --no-binary :all: 仍然是同样的问题。任何解决此问题的帮助都会对我有所帮助。

Python 版本:3.7 Linux版本:python:3.7-alpine 下面是安装的堆栈跟踪。

**sudo pip install pyarrow --proxy=x.x.x.x.**

*Looking in indexes: https://x.x.x.x/api/pypi/python/simple/
Collecting pyarrow
  Downloading https://repo.lab.pl.alcatel-lucent.com/api/pypi/python/packages/packages/fd/b7/78115614c4b227796cc87fff907930f6ae6dd999c5000d3d6ae5c2e54582/pyarrow-2.0.0.tar.gz (58.9 MB)
     |████████████████████████████████| 58.9 MB 55 kB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: numpy>=1.14 in /usr/local/lib/python3.7/site-packages (from pyarrow) (1.19.4)
Building wheels for collected packages: pyarrow
  Building wheel for pyarrow (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python /usr/local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmp46hjz8zm
       cwd: /tmp/pip-install-0fdjam97/pyarrow
  Complete output (555 lines):
  running bdist_wheel
  cmake -DPYTHON_EXECUTABLE=/usr/local/bin/python -DPython3_EXECUTABLE=/usr/local/bin/python  -DPYARROW_BUILD_CUDA=off -DPYARROW_BUILD_FLIGHT=off -DPYARROW_BUILD_GANDIVA=off -DPYARROW_BUILD_DATASET=off -DPYARROW_BUILD_ORC=off -DPYARROW_BUILD_PARQUET=off -DPYARROW_BUILD_PLASMA=off -DPYARROW_BUILD_S3=off -DPYARROW_BUILD_HDFS=off -DPYARROW_USE_TENSORFLOW=off -DPYARROW_BUNDLE_ARROW_CPP=off -DPYARROW_BUNDLE_BOOST=off -DPYARROW_GENERATE_COVERAGE=off -DPYARROW_BOOST_USE_SHARED=on -DPYARROW_PARQUET_USE_SHARED=on -DCMAKE_BUILD_TYPE=release /tmp/pip-install-0fdjam97/pyarrow
  error: command 'cmake' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pyarrow
Failed to build pyarrow
ERROR: Could not build wheels for pyarrow which use PEP 517 and cannot be installed directly*

【问题讨论】:

    标签: python-3.x pip pyarrow


    【解决方案1】:

    这里最有可能的猜测是您缺少cmake。由于您可能使用的是不支持 manylinux 轮子的 Linux 发行版,因此您需要 pyarrow 上列出的所有构建依赖项https://arrow.apache.org/docs/developers/python.html#using-pip 对于 Ubuntu/Debian,它们可以使用以下方式安装:

    $ sudo apt-get install libjemalloc-dev libboost-dev \
                           libboost-filesystem-dev \
                           libboost-system-dev \
                           libboost-regex-dev \
                           python-dev \
                           autoconf \
                           flex \
                           bison
    

    【讨论】:

      猜你喜欢
      • 2021-06-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-27
      • 1970-01-01
      • 2017-03-26
      相关资源
      最近更新 更多