We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
import pandas as pd A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.0 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 "/Users/dan/Library/Application Support/JetBrains/PyCharmCE2024.1/scratches/scratch_30.py", line 4, in <module> import pandas as pd File "/opt/homebrew/lib/python3.11/site-packages/pandas/__init__.py", line 49, in <module> from pandas.core.api import ( File "/opt/homebrew/lib/python3.11/site-packages/pandas/core/api.py", line 28, in <module> from pandas.core.arrays import Categorical File "/opt/homebrew/lib/python3.11/site-packages/pandas/core/arrays/__init__.py", line 1, in <module> from pandas.core.arrays.arrow import ArrowExtensionArray File "/opt/homebrew/lib/python3.11/site-packages/pandas/core/arrays/arrow/__init__.py", line 5, in <module> from pandas.core.arrays.arrow.array import ArrowExtensionArray File "/opt/homebrew/lib/python3.11/site-packages/pandas/core/arrays/arrow/array.py", line 50, in <module> from pandas.core import ( File "/opt/homebrew/lib/python3.11/site-packages/pandas/core/ops/__init__.py", line 8, in <module> from pandas.core.ops.array_ops import ( File "/opt/homebrew/lib/python3.11/site-packages/pandas/core/ops/array_ops.py", line 56, in <module> from pandas.core.computation import expressions File "/opt/homebrew/lib/python3.11/site-packages/pandas/core/computation/expressions.py", line 21, in <module> from pandas.core.computation.check import NUMEXPR_INSTALLED File "/opt/homebrew/lib/python3.11/site-packages/pandas/core/computation/check.py", line 5, in <module> ne = import_optional_dependency("numexpr", errors="warn") File "/opt/homebrew/lib/python3.11/site-packages/pandas/compat/_optional.py", line 135, in import_optional_dependency module = importlib.import_module(name) File "/opt/homebrew/Cellar/[email protected]/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/opt/homebrew/lib/python3.11/site-packages/numexpr/__init__.py", line 24, in <module> from numexpr.interpreter import MAX_THREADS, use_vml, __BLOCK_SIZE1__ AttributeError: _ARRAY_API not found A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.0 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 "/Users/dan/Library/Application Support/JetBrains/PyCharmCE2024.1/scratches/scratch_30.py", line 4, in <module> import pandas as pd File "/opt/homebrew/lib/python3.11/site-packages/pandas/__init__.py", line 49, in <module> from pandas.core.api import ( File "/opt/homebrew/lib/python3.11/site-packages/pandas/core/api.py", line 28, in <module> from pandas.core.arrays import Categorical File "/opt/homebrew/lib/python3.11/site-packages/pandas/core/arrays/__init__.py", line 1, in <module> from pandas.core.arrays.arrow import ArrowExtensionArray File "/opt/homebrew/lib/python3.11/site-packages/pandas/core/arrays/arrow/__init__.py", line 5, in <module> from pandas.core.arrays.arrow.array import ArrowExtensionArray File "/opt/homebrew/lib/python3.11/site-packages/pandas/core/arrays/arrow/array.py", line 64, in <module> from pandas.core.arrays.masked import BaseMaskedArray File "/opt/homebrew/lib/python3.11/site-packages/pandas/core/arrays/masked.py", line 60, in <module> from pandas.core import ( File "/opt/homebrew/lib/python3.11/site-packages/pandas/core/nanops.py", line 52, in <module> bn = import_optional_dependency("bottleneck", errors="warn") File "/opt/homebrew/lib/python3.11/site-packages/pandas/compat/_optional.py", line 135, in import_optional_dependency module = importlib.import_module(name) File "/opt/homebrew/Cellar/[email protected]/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/opt/homebrew/lib/python3.11/site-packages/bottleneck/__init__.py", line 7, in <module> from .move import (move_argmax, move_argmin, move_max, move_mean, move_median, AttributeError: _ARRAY_API not found
Unable to import Pandas after upgrading to 2.2.2 with Numpy 2.0.0.
That error should not occur as Numpy 2 is supposed to be supported in Pandas 2.2.2 as per release notes(https://pandas.pydata.org/docs/whatsnew/v2.2.2.html)
Unable to run pd.show_versions() as it throws error above when importing pandas
pd.show_versions()
> pip list ... pandas 2.2.2 numpy 2.0.0 pyarrow 16.1.0 ...
The text was updated successfully, but these errors were encountered:
Your error occurs when pandas imports the bottleneck optional dependency. Ensure you are using bottleneck 1.4.0 which includes numpy 2.0 support.
Sorry, something went wrong.
Thanks for the issue but as mentioned, this is coming from bottleneck so closing as an upstream issue
No branches or pull requests
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
Unable to import Pandas after upgrading to 2.2.2 with Numpy 2.0.0.
Expected Behavior
That error should not occur as Numpy 2 is supposed to be supported in Pandas 2.2.2 as per release notes(https://pandas.pydata.org/docs/whatsnew/v2.2.2.html)
Installed Versions
Unable to run
pd.show_versions()
as it throws error above when importing pandasThe text was updated successfully, but these errors were encountered: