pyarrow==0.17.1 installation ends with fatal error: 'arrow/python/config.h' file not found (Apple M1 chip)

pyarrow==0.17.1 installation ends with fatal error: 'arrow/python/config.h' file not found (Apple M1 chip)

我正在尝试在我的 MacBook pro 机器(Apple M1 芯片)上安装 pyarrow==0.17.1 软件包,但出现以下错误

      -- Found PkgConfig: /opt/homebrew/bin/pkg-config (found version "0.29.2")
      -- Found Arrow: /opt/homebrew/Cellar/apache-arrow/7.0.0_3/include (found version "7.0.0")
      -- Arrow version: 7.0.0 (HOME: /opt/homebrew/Cellar/apache-arrow/7.0.0_3)
      -- Arrow SO and ABI version: 700
      -- Arrow full SO version: 700.0.0
      -- Found the Arrow core shared library: /opt/homebrew/Cellar/apache-arrow/7.0.0_3/lib/libarrow.dylib
      -- Found the Arrow core import library: /opt/homebrew/Cellar/apache-arrow/7.0.0_3/lib/libarrow.dylib
      -- Found the Arrow core static library: /opt/homebrew/Cellar/apache-arrow/7.0.0_3/lib/libarrow.a
      -- Found ArrowPython: /opt/homebrew/Cellar/apache-arrow/7.0.0_3/include (found version "7.0.0")
      -- Found the Arrow Python by HOME: /opt/homebrew/Cellar/apache-arrow/7.0.0_3
      -- Found the Arrow Python shared library: /opt/homebrew/Cellar/apache-arrow/7.0.0_3/lib/libarrow_python.dylib
      -- Found the Arrow Python import library: /opt/homebrew/Cellar/apache-arrow/7.0.0_3/lib/libarrow_python.dylib
      -- Found the Arrow Python static library: /opt/homebrew/Cellar/apache-arrow/7.0.0_3/lib/libarrow_python.a
      -- Configuring done
      -- Generating done
      -- Build files have been written to: /private/var/folders/6m/ychzdp6s7l390zfm77myvxzr0000gn/T/pip-install-lv5qrivl/pyarrow_12e0171ed6fa433da71d5392c3e10c3a/build/temp.macosx-12.0-arm64-3.7
      -- Finished cmake for pyarrow
      -- Running cmake --build for pyarrow
      cmake --build . --config release --
      [  6%] Compiling Cython CXX source for lib...
      [  6%] Built target lib_pyx
      [ 13%] Building CXX object CMakeFiles/lib.dir/lib.cpp.o
      /private/var/folders/6m/ychzdp6s7l390zfm77myvxzr0000gn/T/pip-install-lv5qrivl/pyarrow_12e0171ed6fa433da71d5392c3e10c3a/build/temp.macosx-12.0-arm64-3.7/lib.cpp:774:10: fatal error: 'arrow/python/config.h' file not found
      #include "arrow/python/config.h"
               ^~~~~~~~~~~~~~~~~~~~~~~
      1 error generated.
      make[2]: *** [CMakeFiles/lib.dir/lib.cpp.o] Error 1
      make[1]: *** [CMakeFiles/lib.dir/all] Error 2
      make: *** [all] Error 2
      error: command 'cmake' failed with exit status 2
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

我找不到针对此问题的可靠解决方案,我查看的唯一参考资料如下 - https://github.com/apache/arrow/issues/2281,如前所述,那里没有经过验证的解决方案。

我使用的版本是: python 3.7.12 点 22.0.4

在我的机器上,我安装了以下 - apache-arrow, apache-arrow-glib, cmake。 我还尝试使用 --no-use-pep517 标志安装包,如下所示 - pip install --no-use-pep517 pyarrow==0.17.1 - 没有成功。

我在arrow/python/里面看了一眼,config.h明显不见了,我也看了arrow/里面确实有一个config.h,但是,它不是config.h 是必需的。

有人知道如何解决这个问题吗?

pyarrow==0.17.1 早于 M1 芯片(2020 年 5 月与 2020 年 11 月)。

您不想使用 pyarrow==7.0.0 的任何特定原因?您的 brew 安装箭头似乎也是 7.0.0。