【问题标题】:Occur "Could NOT find Arrow" error when using pip_pypy3 to install pyarrow使用 pip_pypy3 安装 pyarrow 时出现“Could NOT find Arrow”错误
【发布时间】:2021-04-15 15:10:36
【问题描述】:

我正在尝试使用pypy3安装pyarrow,但是出现了一些错误。

基本信息爆:

macOS 10.15.7
Xcode 12.3
python version 3.7.9
pypy3 version 7.3.3 
pyarrow version 0.17.1
cmd is 'pip_pypy3 install pyarrow==0.17.1'

日志中的一些关键信息和错误内容:

...
Requirement already satisfied: numpy>=1.14 in /usr/local/Cellar/pypy3/7.3.3/libexec/site-packages (from pyarrow==0.17.1) (1.19.5)
...
cmake -DPYTHON_EXECUTABLE=/usr/local/Cellar/pypy3/7.3.3/bin/pypy3  -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 /private/var/folders/7p/d9yrtx8s2h94h9bh3x801zmr0000gn/T/pip-install-jagh2frg/pyarrow_522bc325fbd74d9ebdf84f29e3a66c0c
...
2021-01-10T21:19:27,670   -- Found Python3: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 (found version "3.7.9") found components: Interpreter Development NumPy Development.Module Development.Embed
2021-01-10T21:19:27,713   -- Found Python3Alt: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7
2021-01-10T21:19:28,226   CMake Warning (dev) at /usr/local/Cellar/cmake/3.19.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:426 (message):
2021-01-10T21:19:28,227     The package name passed to `find_package_handle_standard_args` (PkgConfig)
2021-01-10T21:19:28,227     does not match the name of the calling package (Arrow).  This can lead to
2021-01-10T21:19:28,227     problems in calling code that expects `find_package` result variables
2021-01-10T21:19:28,227     (e.g., `_FOUND`) to follow a certain pattern.
2021-01-10T21:19:28,227   Call Stack (most recent call first):
2021-01-10T21:19:28,227     /usr/local/Cellar/cmake/3.19.2/share/cmake/Modules/FindPkgConfig.cmake:67 (find_package_handle_standard_args)
2021-01-10T21:19:28,228     cmake_modules/FindArrow.cmake:39 (include)
2021-01-10T21:19:28,228     cmake_modules/FindArrowPython.cmake:46 (find_package)
2021-01-10T21:19:28,228     CMakeLists.txt:210 (find_package)
2021-01-10T21:19:28,228   This warning is for project developers.  Use -Wno-dev to suppress it.

2021-01-10T21:19:28,229   -- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2")
2021-01-10T21:19:28,255   -- Could NOT find Arrow (missing: Arrow_DIR)
2021-01-10T21:19:28,255   -- Checking for module 'arrow'
2021-01-10T21:19:28,269   --   No package 'arrow' found
2021-01-10T21:19:28,270   CMake Error at /usr/local/Cellar/cmake/3.19.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:218 (message):
2021-01-10T21:19:28,270     **Could NOT find Arrow (missing: ARROW_INCLUDE_DIR ARROW_LIB_DIR**
2021-01-10T21:19:28,270     **ARROW_FULL_SO_VERSION ARROW_SO_VERSION)**
2021-01-10T21:19:28,271   Call Stack (most recent call first):
2021-01-10T21:19:28,271     /usr/local/Cellar/cmake/3.19.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:582 (_FPHSA_FAILURE_MESSAGE)
2021-01-10T21:19:28,271     cmake_modules/FindArrow.cmake:412 (find_package_handle_standard_args)
2021-01-10T21:19:28,271     cmake_modules/FindArrowPython.cmake:46 (find_package)
2021-01-10T21:19:28,271     CMakeLists.txt:210 (find_package)
2021-01-10T21:19:28,272   -- Configuring incomplete, errors occurred!

是否需要添加一些环境变量(如ARROW_INCLUDE_DIR)才能完成安装?


按照Uwe L. Korn所说,我已经使用brew install brew install apache-arrowbrew install apache-arrow-glib安装了arrow c++,但是还有一个问题。

2021-01-11T17:44:05,139   creating build/bdist.macosx-10.7-x86_64/wheel/pyarrow/include
2021-01-11T17:44:05,140   error: can't copy 'build/lib.macosx-10.7-x86_64-3.7/pyarrow/include/arrow': doesn't exist or not a regular file
2021-01-11T17:44:05,149   ERROR: Failed building wheel for pyarrow
2021-01-11T17:44:05,151 Failed to build pyarrow
2021-01-11T17:44:05,152 ERROR: Could not build wheels for pyarrow which use PEP 517 and cannot be installed directly
2021-01-11T17:44:05,152 Exception information:
2021-01-11T17:44:05,152 Traceback (most recent call last):
2021-01-11T17:44:05,152   File "/usr/local/Cellar/pypy3/7.3.3/libexec/site-packages/pip-20.3.3-py3.7.egg/pip/_internal/cli/base_command.py", line 224, in _main
2021-01-11T17:44:05,152     status = self.run(options, args)
2021-01-11T17:44:05,152   File "/usr/local/Cellar/pypy3/7.3.3/libexec/site-packages/pip-20.3.3-py3.7.egg/pip/_internal/cli/req_command.py", line 180, in wrapper
2021-01-11T17:44:05,152     return func(self, options, args)
2021-01-11T17:44:05,152   File "/usr/local/Cellar/pypy3/7.3.3/libexec/site-packages/pip-20.3.3-py3.7.egg/pip/_internal/commands/install.py", line 364, in run
2021-01-11T17:44:05,152     ", ".join(pep517_build_failure_names)
2021-01-11T17:44:05,152 pip._internal.exceptions.InstallationError: Could not build wheels for pyarrow which use PEP 517 and cannot be installed directly
2021-01-11T17:44:05,200 Removed build tracker: '/private/var/folders/7p/d9yrtx8s2h94h9bh3x801zmr0000gn/T/pip-req-tracker-lp8m3f4g'

【问题讨论】:

    标签: python cmake pypy pyarrow


    【解决方案1】:

    您的编译问题的答案是您应该首先安装 Arrow C++。但这只会让您更进一步,接下来您将遇到一个新的障碍,因为pyarrow 目前无法使用 PyPy,只能使用 CPython。有一个开放的上游问题ARROW-2651,您可以在其中跟踪进度,但目前似乎没有人在这方面工作。因此,在您的情况下,您可以坚持使用 CPython 或帮助解决该问题以修复丢失的位以使其在 PyPy 上运行。

    【讨论】:

    • 我已经安装了arrow c++,但是还有一个问题(在问题描述中更新)。这个问题需要pyarrow端还是pypy端来解决?
    • 这可能需要双方解决。它看起来并不复杂,但需要有人研究。
    • 谢谢,期待pyarrow早日支持pypy
    • 是否支持 pyston?
    • 在 Debian 10 (buster / stable) 的上下文中“安装的箭头 c++”是什么意思?我找不到合适的包。
    【解决方案2】:

    安装 Arrow C++,请参阅文档 C++ and GLib (C) Packages for Debian GNU/Linux, Ubuntu, AlmaLinux, CentOS and Amazon Linuxhttps://arrow.apache.org/install/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-09-03
      • 2019-09-14
      • 1970-01-01
      • 1970-01-01
      • 2022-01-18
      • 2011-04-15
      • 2021-01-06
      • 1970-01-01
      相关资源
      最近更新 更多