### Pandas version checks
- [X] I have checked that this issue has not alreadβ¦y been reported.
- [X] I have confirmed this bug exists on the [latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
- [X] I have confirmed this bug exists on the [main branch](https://pandas.pydata.org/docs/dev/getting_started/install.html#installing-the-development-version-of-pandas) of pandas.
### Reproducible Example
```python
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 "", line 14, in
import as qi
File "y", line 14, in
import pandas as pd
File "C:\Python312\Lib\site-packages\pandas_init_.py", line 62, in
from pandas.core.api import (
File "C:\Python312\Lib\site-packages\pandas\core\api.py", line 28, in
from pandas.core.arrays import Categorical
File "C:\Python312\Lib\site-packages\pandas\core\arrays_init_.py", line 1, in
from pandas.core.arrays.arrow import ArrowExtensionArray
File "C:\Python312\Lib\site-packages\pandas\core\arrays\arrow_init_.py", line 5, in
from pandas.core.arrays.arrow.array import ArrowExtensionArray
File "C:\Python312\Lib\site-packages\pandas\core\arrays\arrow\array.py", line 64, in
from pandas.core.arrays.masked import BaseMaskedArray
File "C:\Python312\Lib\site-packages\pandas\core\arrays\masked.py", line 60, in
from pandas.core import (
File "C:\Python312\Lib\site-packages\pandas\core\nanops.py", line 52, in
bn = import_optional_dependency("bottleneck", errors="warn")
File "C:\Python312\Lib\site-packages\pandas\compat_optional.py", line 135, in import_optional_dependency
module = importlib.import_module(name)
File "C:\Python312\Lib\importlib_init_.py", line 90, in import_module
return _bootstrap.gcd_import(name[level:], package, level)
File "C:\Python312\Lib\site-packages\bottleneck_init.py", line 7, in
from .move import (move_argmax, move_argmin, move_max, move_mean, move_median,
Traceback (most recent call last):
File "C:\Users\cuili\AppData\Roaming\Python\Python312\site-packages\numpy\core_multiarray_umath.py", line 44, in getattr
raise ImportError(msg)
ImportError:
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.
```
### Issue Description
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 "", line 14, in
import q as qi
File "", line 14, in
import pandas as pd
File "C:\Python312\Lib\site-packages\pandas_init_.py", line 62, in
from pandas.core.api import (
File "C:\Python312\Lib\site-packages\pandas\core\api.py", line 28, in
from pandas.core.arrays import Categorical
File "C:\Python312\Lib\site-packages\pandas\core\arrays_init_.py", line 1, in
from pandas.core.arrays.arrow import ArrowExtensionArray
File "C:\Python312\Lib\site-packages\pandas\core\arrays\arrow_init_.py", line 5, in
from pandas.core.arrays.arrow.array import ArrowExtensionArray
File "C:\Python312\Lib\site-packages\pandas\core\arrays\arrow\array.py", line 64, in
from pandas.core.arrays.masked import BaseMaskedArray
File "C:\Python312\Lib\site-packages\pandas\core\arrays\masked.py", line 60, in
from pandas.core import (
File "C:\Python312\Lib\site-packages\pandas\core\nanops.py", line 52, in
bn = import_optional_dependency("bottleneck", errors="warn")
File "C:\Python312\Lib\site-packages\pandas\compat_optional.py", line 135, in import_optional_dependency
module = importlib.import_module(name)
File "C:\Python312\Lib\importlib_init_.py", line 90, in import_module
return _bootstrap.gcd_import(name[level:], package, level)
File "C:\Python312\Lib\site-packages\bottleneck_init.py", line 7, in
from .move import (move_argmax, move_argmin, move_max, move_mean, move_median,
Traceback (most recent call last):
File "C:\Users\cuili\AppData\Roaming\Python\Python312\site-packages\numpy\core_multiarray_umath.py", line 44, in getattr
raise ImportError(msg)
ImportError:
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.
### Expected Behavior
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 "", line 14, in
import q as qi
File "", line 14, in
import pandas as pd
File "C:\Python312\Lib\site-packages\pandas_init_.py", line 62, in
from pandas.core.api import (
File "C:\Python312\Lib\site-packages\pandas\core\api.py", line 28, in
from pandas.core.arrays import Categorical
File "C:\Python312\Lib\site-packages\pandas\core\arrays_init_.py", line 1, in
from pandas.core.arrays.arrow import ArrowExtensionArray
File "C:\Python312\Lib\site-packages\pandas\core\arrays\arrow_init_.py", line 5, in
from pandas.core.arrays.arrow.array import ArrowExtensionArray
File "C:\Python312\Lib\site-packages\pandas\core\arrays\arrow\array.py", line 64, in
from pandas.core.arrays.masked import BaseMaskedArray
File "C:\Python312\Lib\site-packages\pandas\core\arrays\masked.py", line 60, in
from pandas.core import (
File "C:\Python312\Lib\site-packages\pandas\core\nanops.py", line 52, in
bn = import_optional_dependency("bottleneck", errors="warn")
File "C:\Python312\Lib\site-packages\pandas\compat_optional.py", line 135, in import_optional_dependency
module = importlib.import_module(name)
File "C:\Python312\Lib\importlib_init_.py", line 90, in import_module
return _bootstrap.gcd_import(name[level:], package, level)
File "C:\Python312\Lib\site-packages\bottleneck_init.py", line 7, in
from .move import (move_argmax, move_argmin, move_max, move_mean, move_median,
Traceback (most recent call last):
File "C:\Users\cuili\AppData\Roaming\Python\Python312\site-packages\numpy\core_multiarray_umath.py", line 44, in getattr
raise ImportError(msg)
ImportError:
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.
### Installed Versions
<details>
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 "", line 14, in
import q as qi
File "", line 14, in
import pandas as pd
File "C:\Python312\Lib\site-packages\pandas_init_.py", line 62, in
from pandas.core.api import (
File "C:\Python312\Lib\site-packages\pandas\core\api.py", line 28, in
from pandas.core.arrays import Categorical
File "C:\Python312\Lib\site-packages\pandas\core\arrays_init_.py", line 1, in
from pandas.core.arrays.arrow import ArrowExtensionArray
File "C:\Python312\Lib\site-packages\pandas\core\arrays\arrow_init_.py", line 5, in
from pandas.core.arrays.arrow.array import ArrowExtensionArray
File "C:\Python312\Lib\site-packages\pandas\core\arrays\arrow\array.py", line 64, in
from pandas.core.arrays.masked import BaseMaskedArray
File "C:\Python312\Lib\site-packages\pandas\core\arrays\masked.py", line 60, in
from pandas.core import (
File "C:\Python312\Lib\site-packages\pandas\core\nanops.py", line 52, in
bn = import_optional_dependency("bottleneck", errors="warn")
File "C:\Python312\Lib\site-packages\pandas\compat_optional.py", line 135, in import_optional_dependency
module = importlib.import_module(name)
File "C:\Python312\Lib\importlib_init_.py", line 90, in import_module
return _bootstrap.gcd_import(name[level:], package, level)
File "C:\Python312\Lib\site-packages\bottleneck_init.py", line 7, in
from .move import (move_argmax, move_argmin, move_max, move_mean, move_median,
Traceback (most recent call last):
File "C:\Users\cuili\AppData\Roaming\Python\Python312\site-packages\numpy\core_multiarray_umath.py", line 44, in getattr
raise ImportError(msg)
ImportError:
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.
</details>