PyArrow and NumPy 2 compatibility (tested)

PyArrow 15 and older fail at import pyarrow under NumPy 2 with AttributeError: _ARRAY_API not found and ImportError: numpy.core.multiarray failed to import. PyArrow 16.0.0 is the first release that supports NumPy 2. Tested below.

1. Reproduce: PyArrow 15.0.2 with NumPy 2

A Python 3.11 venv with pyarrow==15.0.2, then numpy==2.2.6 installed in a second command (asking for both at once is refused, because 15.0.2 requires numpy<2). b1.py:

import numpy
print("numpy", numpy.__version__)
import pyarrow as pa
print("pyarrow", pa.__version__)
arr = pa.array(numpy.arange(3))
print(arr.to_numpy())

Output, exit code 1 (paths shortened to /venv):

numpy 2.2.6

A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.2.6 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.

Traceback (most recent call last):  File "b1.py", line 3, in <module>
    import pyarrow as pa
  File "/venv/lib/python3.11/site-packages/pyarrow/__init__.py", line 65, in <module>
    import pyarrow.lib as _lib
AttributeError: _ARRAY_API not found
Traceback (most recent call last):
  File "b1.py", line 3, in <module>
    import pyarrow as pa
  File "/venv/lib/python3.11/site-packages/pyarrow/__init__.py", line 65, in <module>
    import pyarrow.lib as _lib
  File "pyarrow/lib.pyx", line 36, in init pyarrow.lib
ImportError: numpy.core.multiarray failed to import

It fails at import pyarrow, inside the compiled pyarrow.lib, which was built against the NumPy 1.x C API. Any code path that imports PyArrow hits this same error at that import.

2. Which PyArrow version supports NumPy 2

PyPI metadata: pyarrow 15.0.2 requires numpy>=1.16.6,<2; pyarrow 16.0.0 requires numpy>=1.16.6 with no cap. PyArrow 16.0.0 is the first release that works with NumPy 2; it ran b1.py with numpy 2.2.6:

$ pip install "pyarrow==16.0.0"
$ python b1.py
numpy 2.2.6
pyarrow 16.0.0
[0 1 2]

3. Fix: pin numpy<2, or upgrade PyArrow

$ pip install "numpy<2"
$ python b1.py
numpy 1.26.4
pyarrow 15.0.2
[0 1 2]
$ pip install -U pyarrow numpy
$ python b1.py
numpy 2.4.6
pyarrow 26.0.0
[0 1 2]

On Python 3.11 the upgrade resolved to PyArrow 26.0.0 with NumPy 2.4.6. Restart any Jupyter kernel after changing versions. Same problem elsewhere: pandas, SciPy, Matplotlib, the general banner. All changes: NumPy 2 breaking changes.

Frequently asked questions

Which PyArrow version supports NumPy 2?

PyArrow 16.0.0: its metadata drops the numpy<2 cap, and it ran with numpy 2.2.6 in this test. 15.0.2 failed.

How do I fix import pyarrow failing on NumPy 2?

pip install "numpy<2", or pip install -U pyarrow (16.0.0 or newer).

Written with AI assistance. Measured on 2026-10-24 on Linux with Python 3.11.17: pyarrow 15.0.2 with numpy 2.2.6 and 1.26.4, pyarrow 16.0.0 with numpy 2.2.6, and an upgrade to pyarrow 26.0.0 with numpy 2.4.6. The script ran verbatim and output was pasted unedited (paths shortened). Version pins read from PyPI metadata the same day. PlainTables is our extension; PyArrow and NumPy are free.