安装 Apache Arrow

当前版本:22.0.0 (2025-10-24)

关于新功能的更多信息,请参阅版本说明。有关先前版本的信息,请参阅版本列表。Go、Java、Julia 和 Rust 库是分开独立发布的。详情请参阅以下页面:

本页是发布工件和包管理器的参考列表。有关特定语言的用户指南,请参阅上方“文档”菜单中列出的页面。


源码发布

Python Wheels

我们已在 PyPI 上为 Linux、macOS 和 Windows 提供了官方的二进制 wheels 包。

pip install 'pyarrow==22.0.*'

我们建议在 requirements.txt 文件中锁定 22.0.* 版本以安装最新的补丁版本。

这些 wheel 包中已捆绑了 Apache Arrow 和 Apache Parquet C++ 二进制库。

适用于 Debian GNU/Linux、Ubuntu、AlmaLinux、CentOS、Red Hat Enterprise Linux、Amazon Linux 和 Oracle Linux 的 C++ 和 GLib (C) 包

我们为 Apache Arrow C++ 和 Apache Arrow GLib (C) 提供了 APT 和 Yum 仓库。支持的平台如下:

Debian GNU/Linux 和 Ubuntu

sudo apt update
sudo apt install -y -V ca-certificates lsb-release wget
wget https://packages.apache.org/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt update
sudo apt install -y -V libarrow-dev # For C++
sudo apt install -y -V libarrow-glib-dev # For GLib (C)
sudo apt install -y -V libarrow-dataset-dev # For Apache Arrow Dataset C++
sudo apt install -y -V libarrow-dataset-glib-dev # For Apache Arrow Dataset GLib (C)
sudo apt install -y -V libarrow-acero-dev # For Apache Arrow Acero
sudo apt install -y -V libarrow-flight-dev # For Apache Arrow Flight C++
sudo apt install -y -V libarrow-flight-glib-dev # For Apache Arrow Flight GLib (C)
sudo apt install -y -V libarrow-flight-sql-dev # For Apache Arrow Flight SQL C++
sudo apt install -y -V libarrow-flight-sql-glib-dev # For Apache Arrow Flight SQL GLib (C)
sudo apt install -y -V libgandiva-dev # For Gandiva C++
sudo apt install -y -V libgandiva-glib-dev # For Gandiva GLib (C)
sudo apt install -y -V libparquet-dev # For Apache Parquet C++
sudo apt install -y -V libparquet-glib-dev # For Apache Parquet GLib (C)

AlmaLinux 8/9、Oracle Linux 8/9、Red Hat Enterprise Linux 8/9 和 CentOS Stream 8/9

sudo dnf install -y epel-release || sudo dnf install -y oracle-epel-release-el$(cut -d: -f5 /etc/system-release-cpe | cut -d. -f1) || sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(cut -d: -f5 /etc/system-release-cpe | cut -d. -f1).noarch.rpm
sudo dnf install -y https://packages.apache.org/artifactory/arrow/almalinux/$(cut -d: -f5 /etc/system-release-cpe | cut -d. -f1)/apache-arrow-release-latest.rpm
sudo dnf config-manager --set-enabled epel || :
sudo dnf config-manager --set-enabled powertools || :
sudo dnf config-manager --set-enabled crb || :
sudo dnf config-manager --set-enabled ol$(cut -d: -f5 /etc/system-release-cpe | cut -d. -f1)_codeready_builder || :
sudo dnf config-manager --set-enabled codeready-builder-for-rhel-$(cut -d: -f5 /etc/system-release-cpe | cut -d. -f1)-rhui-rpms || :
sudo subscription-manager repos --enable codeready-builder-for-rhel-$(cut -d: -f5 /etc/system-release-cpe | cut -d. -f1)-$(arch)-rpms || :
sudo dnf install -y arrow-devel # For C++
sudo dnf install -y arrow-glib-devel # For GLib (C)
sudo dnf install -y arrow-dataset-devel # For Apache Arrow Dataset C++
sudo dnf install -y arrow-dataset-glib-devel # For Apache Arrow Dataset GLib (C)
sudo dnf install -y arrow-acero-devel # For Apache Arrow Acero C++
sudo dnf install -y arrow-flight-devel # For Apache Arrow Flight C++
sudo dnf install -y arrow-flight-glib-devel # For Apache Arrow Flight GLib (C)
sudo dnf install -y arrow-flight-sql-devel # For Apache Arrow Flight SQL C++
sudo dnf install -y arrow-flight-sql-glib-devel # For Apache Arrow Flight SQL GLib (C)
sudo dnf install -y gandiva-devel # For Apache Gandiva C++
sudo dnf install -y gandiva-glib-devel # For Apache Gandiva GLib (C)
sudo dnf install -y parquet-devel # For Apache Parquet C++
sudo dnf install -y parquet-glib-devel # For Apache Parquet GLib (C)

CentOS 7 和 Red Hat Enterprise Linux 7

sudo yum install -y epel-release || sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(cut -d: -f5 /etc/system-release-cpe | cut -d. -f1).noarch.rpm
sudo yum install -y https://packages.apache.org/artifactory/arrow/centos/$(cut -d: -f5 /etc/system-release-cpe | cut -d. -f1)/apache-arrow-release-latest.rpm
sudo yum install -y --enablerepo=epel arrow-devel # For C++
sudo yum install -y --enablerepo=epel arrow-glib-devel # For GLib (C)
sudo yum install -y --enablerepo=epel arrow-dataset-devel # For Apache Arrow Dataset C++
sudo yum install -y --enablerepo=epel arrow-dataset-glib-devel # For Apache Arrow Dataset GLib (C)
sudo yum install -y --enablerepo=epel arrow-acero-devel # For Apache Arrow Acero
sudo yum install -y --enablerepo=epel parquet-devel # For Apache Parquet C++
sudo yum install -y --enablerepo=epel parquet-glib-devel # For Apache Parquet GLib (C)

Amazon Linux 2023

sudo dnf install -y https://packages.apache.org/artifactory/arrow/amazon-linux/$(cut -d: -f6 /etc/system-release-cpe)/apache-arrow-release-latest.rpm
sudo dnf install -y arrow-devel # For C++
sudo dnf install -y arrow-glib-devel # For GLib (C)
sudo dnf install -y arrow-acero-devel # For Apache Arrow Acero
sudo dnf install -y arrow-dataset-devel # For Apache Arrow Dataset C++
sudo dnf install -y arrow-dataset-glib-devel # For Apache Arrow Dataset GLib (C)
sudo dnf install -y arrow-flight-devel # For Apache Arrow Flight C++
sudo dnf install -y arrow-flight-glib-devel # For Apache Arrow Flight GLib (C)
sudo dnf install -y arrow-flight-sql-devel # For Apache Arrow Flight SQL C++
sudo dnf install -y arrow-flight-sql-glib-devel # For Apache Arrow Flight SQL GLib (C)
sudo dnf install -y gandiva-devel # For Apache Gandiva C++
sudo dnf install -y gandiva-glib-devel # For Apache Gandiva GLib (C)
sudo dnf install -y parquet-devel # For Apache Parquet C++
sudo dnf install -y parquet-glib-devel # For Apache Parquet GLib (C)

C# 包

我们为 Apache Arrow C# 提供了 NuGet 包。

其他安装程序

为方便起见,我们也通过多个包管理器提供软件包。其中许多是基于源码版本构建的二进制包。由于 Apache Arrow PMC 并未对这些软件包进行明确投票,因此从技术上讲,它们被视为非官方发布。

C++、GLib (C)、Python 和 R 的 Conda 包

二进制 conda 包可在 conda-forge 上找到,适用于 Linux (x86_64, aarch64, ppc64le)、macOS (x86_64 and arm64) 和 Windows (x86_64),支持以下版本:

使用以下命令安装:

conda install libarrow-all=22.0.* -c conda-forge
conda install arrow-c-glib=22.0.* -c conda-forge
conda install pyarrow=22.0.* -c conda-forge
conda install r-arrow=22.0.* -c conda-forge

Homebrew 上的 C++ 和 GLib (C) 包

在 macOS 上,您可以使用 Homebrew 安装 C++ 库:

brew install apache-arrow

以及 GLib (C) 包:

brew install apache-arrow-glib

MSYS2 上的 C++ 和 GLib (C) 包

MSYS2 包中包含了 Apache Arrow C++ 和 GLib (C) 包。您可以通过 pacman 安装该包。

GCC + x86_64 + UCRT 版本

pacman -S --noconfirm mingw-w64-ucrt-x86_64-arrow

GCC + x86_64 版本

pacman -S --noconfirm mingw-w64-x86_64-arrow

Clang + x86_64 版本

pacman -S --noconfirm mingw-w64-clang-x86_64-arrow

Clang + aarch64 版本

pacman -S --noconfirm mingw-w64-clang-aarch64-arrow

vcpkg 上的 C++ 包

您可以使用 vcpkg 依赖管理器下载并安装 Apache Arrow C++:

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install arrow

vcpkg 中的 Apache Arrow C++ 端口由微软团队成员和社区贡献者保持更新。如果版本已过时,请在 vcpkg 仓库中创建一个 issue 或 pull request

Conan 上的 C++ 包

您可以使用 Conan 包管理器下载并安装 Apache Arrow C++。例如,您可以使用以下 conanfile.txt 文件:

[requires]
arrow/22.0.0

CRAN 上的 R 包

使用以下命令从 CRAN 安装 R 包:

install.packages("arrow")

RubyGems 上的 Ruby 包

使用以下命令从 RubyGems 为受支持的 Ruby 版本安装 Ruby 包:

gem install red-arrow
gem install red-arrow-cuda # For CUDA support
gem install red-arrow-dataset # For Apache Arrow Dataset support
gem install red-arrow-flight # For Apache Arrow Flight support
gem install red-arrow-flight-sql # For Apache Arrow Flight SQL support
gem install red-gandiva # For Gandiva support
gem install red-parquet # For Apache Parquet support