Skip to content

BUG: HDF support and show_versions() broken with pandas 2.2.2 and numpy 2.0 #59110

New issue

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

Closed
3 tasks done
Dr-Irv opened this issue Jun 26, 2024 · 0 comments · Fixed by #59114
Closed
3 tasks done

BUG: HDF support and show_versions() broken with pandas 2.2.2 and numpy 2.0 #59110

Dr-Irv opened this issue Jun 26, 2024 · 0 comments · Fixed by #59114
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member

Comments

@Dr-Irv
Copy link
Contributor

Dr-Irv commented Jun 26, 2024

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

>>> import pandas as pd
>>> pd.__version__
'2.2.2'
>>> import numpy as np
>>> np.__version__
'2.0.0'
>>> pd.show_versions()
C:\Anaconda3\envs\pandasstubs\lib\site-packages\_distutils_hack\__init__.py:26: UserWarning: Setuptools is replacing distutils.
  warnings.warn("Setuptools is replacing distutils.")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Anaconda3\envs\pandasstubs\lib\site-packages\pandas\util\_print_versions.py", line 141, in show_versions
    deps = _get_dependency_info()
  File "C:\Anaconda3\envs\pandasstubs\lib\site-packages\pandas\util\_print_versions.py", line 98, in _get_dependency_info
    mod = import_optional_dependency(modname, errors="ignore")
  File "C:\Anaconda3\envs\pandasstubs\lib\site-packages\pandas\compat\_optional.py", line 135, in import_optional_dependency
    module = importlib.import_module(name)
  File "C:\Anaconda3\envs\pandasstubs\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "C:\Anaconda3\envs\pandasstubs\lib\site-packages\tables\__init__.py", line 72, in <module>
    from .utilsextension import get_hdf5_version as _get_hdf5_version
  File "tables\\utilsextension.pyx", line 1, in init tables.utilsextension
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

Issue Description

numpy 2.0 causes HDF support and show_versions() broken because pytables hasn't been updated

See PyTables/PyTables#1172

Expected Behavior

No error - or at least show_versions() should work

Installed Versions

Can't do this - show_versions() doesn't work!!

pytables 3.9.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant