Skip to content
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

Unable to import the awkward module in python #664

Open
zwu0922 opened this issue Oct 16, 2024 · 1 comment
Open

Unable to import the awkward module in python #664

zwu0922 opened this issue Oct 16, 2024 · 1 comment

Comments

@zwu0922
Copy link

zwu0922 commented Oct 16, 2024

Hi,

I'm having problem with importing the awkward module in python with the nightly version 2024-10-16. Here is the error message I received when I attempted to import awkward in python:

Python 3.11.9 (main, Sep 20 2024, 11:17:20) [GCC 14.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import awkward
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/cvmfs/sw-nightlies.hsf.org/key4hep/releases/2024-09-21/x86_64-almalinux9-gcc14.2.0-opt/py-awkward/2.6.6-z5legc/lib/python3.11/site-packages/awkward/__init__.py", line 33, in <module>
    import awkward.jax
  File "/cvmfs/sw-nightlies.hsf.org/key4hep/releases/2024-09-21/x86_64-almalinux9-gcc14.2.0-opt/py-awkward/2.6.6-z5legc/lib/python3.11/site-packages/awkward/jax.py", line 10, in <module>
    from awkward import highlevel
  File "/cvmfs/sw-nightlies.hsf.org/key4hep/releases/2024-09-21/x86_64-almalinux9-gcc14.2.0-opt/py-awkward/2.6.6-z5legc/lib/python3.11/site-packages/awkward/highlevel.py", line 29, in <module>
    from awkward._pickle import (
  File "/cvmfs/sw-nightlies.hsf.org/key4hep/releases/2024-09-21/x86_64-almalinux9-gcc14.2.0-opt/py-awkward/2.6.6-z5legc/lib/python3.11/site-packages/awkward/_pickle.py", line 16, in <module>
    import importlib_metadata
ModuleNotFoundError: No module named 'importlib_metadata'
>>> 

Could you please help me fix this issue? Some useful information, including the steps to reproduce the error, can be found below.

Thanks in advance,
Zhibo

  • OS version: AlmaLinux 9.4 (Seafoam Ocelot)
  • Compiler version: gcc (Spack GCC) 14.2.0
  • Reproduced by:
  1. Source the nightly version and run python
source /cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh -r 2024-10-16
python
  1. Import awkward module in python
    import awkward
  • Goal: I would like to be able to import awkward with the latest nightly version.
@jmcarcell
Copy link
Contributor

The workaround is to install importlib-metadata, for example with pip install importlib-metadata --prefix=some/prefix and make sure where the module is installed is in PYTHONPATH. The installation of the module will be in something like some/prefix/lib/python3.11/site-packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants