安装 Apache Arrow

当前版本: 20.0.0 (2025-04-27)

请查阅发布说明以了解更多新特性。关于之前版本的信息,请查看发布列表。Go、Java、Julia 和 Rust 库是单独发布的。请查看以下页面了解详情

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


源代码发布

Python Wheels

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

pip install 'pyarrow==20.0.*'

我们建议在 requirements.txt 中固定 20.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 和 arm64) 和 Windows (x86_64),支持以下版本

使用以下命令安装它们

conda install libarrow-all=20.0.* -c conda-forge
conda install arrow-c-glib=20.0.* -c conda-forge
conda install pyarrow=20.0.* -c conda-forge
conda install r-arrow=20.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++ 端口由 Microsoft 团队成员和社区贡献者维护。如果版本已过期,请在 vcpkg 存储库上创建一个 issue 或 pull request

Conan 上的 C++ 包

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

[requires]
arrow/20.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