如何在M1 Mac Monterey上安装pyarrow



我想知道您是否可以深入了解如何在pyenv虚拟环境中的M1上安装pyarrow?

我已经完成了以下

brew install pyenv
pyenv virtualenv 3.9.1 ve-pas
pyenv activate ve-pas
pip install pyarrow

我得到以下错误输出

clang: build/src.macosx-12.0-arm64-3.9/numpy/core/src/multiarray/einsum.c
clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
----------------------------------------
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly

当使用预装的numpy和时

pip install --no-use-pep517 --no-build-isolation pyarrow

CMake Error at /Users/josh/.pyenv/versions/3.9.1/envs/ve-pas-dev/lib/python3.9/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY
OPENSSL_INCLUDE_DIR)

错误输出。

我通过在.zshrc中添加以下内容来修复

#.zshrc
export OPENSSL_ROOT_DIR="/opt/homebrew/Cellar/openssl@3/3.0.1"

并重新运行第二命令

pip install --no-use-pep517 --no-build-isolation pyarrow

最新更新