尝试升级 pyarrow 会导致错误

attempting to upgrade pyarrow results in errors

我运行这个命令将pyarrow从2.0.0升级到3.0.0:

pip3 install --user --upgrade pyarrow

我遇到了这些错误:

Failed building wheel for pyarrow

...

-- Could NOT find Arrow (missing: Arrow_DIR)
-- Checking for module 'arrow'
--   No package 'arrow' found
CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find Arrow (missing: ARROW_INCLUDE_DIR ARROW_LIB_DIR
  ARROW_FULL_SO_VERSION ARROW_SO_VERSION)
Call Stack (most recent call first):
  /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  cmake_modules/FindArrow.cmake:419 (find_package_handle_standard_args)
  cmake_modules/FindArrowPython.cmake:46 (find_package)
  CMakeLists.txt:214 (find_package)

我该如何解决?

Pyarrow 3.0 版停止运送 manylinux1 source 转而只运送 manylinux2010 和 manylinux2014 轮子。

这意味着从 pyarrow 3.0 开始,如果您想避免从源代码构建,您将需要 pip >= 19.0。

另请注意,Ubuntu 18 上的默认 pip 版本是 pip 版本 9,因此您需要升级 pip(我发现大多数遇到此问题的用户似乎来自 Ubuntu18).