On linux with pip the new numpy 2 seems to work with pandas fine:
$ python3 -c 'import numpy as np; print(np.__version__); import pandas as pd; print(pd.__version__)'
2.0.1
2.2.2
however, on windows with miniconda I get
$ ${localappdata}/miniconda3/envs/c312/python.exe -c 'import numpy as np; print(np,np.__version__); import pandas as pd; print(pd,pd.__version__)'
<module 'numpy' from '${localappdata}\miniconda3\envs\c312\Lib\site-packages\numpy\__init__.py'> 2.0.1
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.1 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 "<string>", line 1, in <module>
File "${localappdata}miniconda3envsc312Libsite-packagespandas__init__.py", line 26, in <module>
from pandas.compat import (
File "${localappdata}miniconda3envsc312Libsite-packagespandascompat__init__.py", line 27, in <module>
from pandas.compat.pyarrow import (
File "${localappdata}miniconda3envsc312Libsite-packagespandascompatpyarrow.py", line 8, in <module>
import pyarrow as pa
File "${localappdata}miniconda3envsc312Libsite-packagespyarrow__init__.py", line 65, in <module>
import pyarrow.lib as _lib
AttributeError: _ARRAY_API not found
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.1 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 "<string>", line 1, in <module>
File "${localappdata}miniconda3envsc312Libsite-packagespandas__init__.py", line 49, in <module>
from pandas.core.api import (
File "${localappdata}miniconda3envsc312Libsite-packagespandascoreapi.py", line 9, in <module>
from pandas.core.dtypes.dtypes import (
File "${localappdata}miniconda3envsc312Libsite-packagespandascoredtypesdtypes.py", line 24, in <module>
from pandas._libs import (
File "${localappdata}miniconda3envsc312Libsite-packagespyarrow__init__.py", line 65, in <module>
import pyarrow.lib as _lib
AttributeError: _ARRAY_API not found
<module 'pandas' from '${localappdata}\miniconda3\envs\c312\Lib\site-packages\pandas\__init__.py'> 2.2.2
Reinstalling (conda install --force-reinstall pandas
) did not help.
So, what do I need to do to get numpy2 working?