Skip to content

Installation issue (related to Numpy 2?)

Summary

Error message when importing km3pipe

AttributeError: module 'numpy' has no attribute 'AxisError'

Environment

  • KM3Pipe version (km3pipe --version): km3pipe==9.13.12
  • Python version (python --version): Python 3.9.18
  • OS: (uname -a) Linux antorcamm3 5.14.0-427.18.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 28 06:27:02 EDT 2024 x86_64 x86_64 x86_64 GNU/Linux
AlmaLinux release 9.4 (Seafoam Ocelot)
NAME="AlmaLinux"
VERSION="9.4 (Seafoam Ocelot)"
ID="almalinux"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.4"
PLATFORM_ID="platform:el9"
PRETTY_NAME="AlmaLinux 9.4 (Seafoam Ocelot)"
ANSI_COLOR="0;34"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:almalinux:almalinux:9::baseos"
HOME_URL="https://almalinux.org/"
DOCUMENTATION_URL="https://wiki.almalinux.org/"
BUG_REPORT_URL="https://bugs.almalinux.org/"

ALMALINUX_MANTISBT_PROJECT="AlmaLinux-9"
ALMALINUX_MANTISBT_PROJECT_VERSION="9.4"
REDHAT_SUPPORT_PRODUCT="AlmaLinux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.4"
SUPPORT_END=2032-06-01
AlmaLinux release 9.4 (Seafoam Ocelot)
AlmaLinux release 9.4 (Seafoam Ocelot)

Additional information

Very probably irrelevant

(The following are optional but may be relevant.)

  • HDF5 metadata (h5info /path/to/relevant/file.h5)
  • ROOT file metadata (JPrintMeta -f /path/to/relevant/file.root):
  • Jpp version (only if relevant, JPrint -v)

Describe the current bug behavior

Error importing km3pipe

Describe the expected correct behavior

I expect to be able to import km3pipe

Steps to reproduce

$ python -m venv venv
$ source venv/bin/activate
$ pip install --upgrade pip
$ pip install km3pipe
$ python
>>> import km3pipe

Relevant logs and/or screenshots

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/data/users/gvannoye/venv/lib64/python3.9/site-packages/km3pipe/__init__.py", line 27, in <module>
    from . import calib  # noqa
  File "/data/users/gvannoye/venv/lib64/python3.9/site-packages/km3pipe/calib.py", line 7, in <module>
    import awkward as ak
  File "/data/users/gvannoye/venv/lib64/python3.9/site-packages/awkward/__init__.py", line 6, in <module>
    import awkward.nplike
  File "/data/users/gvannoye/venv/lib64/python3.9/site-packages/awkward/nplike.py", line 24, in <module>
    class NumpyMetadata(Singleton):
  File "/data/users/gvannoye/venv/lib64/python3.9/site-packages/awkward/nplike.py", line 67, in NumpyMetadata
    AxisError = numpy.AxisError
  File "/data/users/gvannoye/venv/lib64/python3.9/site-packages/numpy/__init__.py", line 410, in __getattr__
    raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'AxisError'
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information