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

No module named 'acts.ActsPythonBindings' #4131

Open
bedanar opened this issue Mar 13, 2025 · 2 comments
Open

No module named 'acts.ActsPythonBindings' #4131

bedanar opened this issue Mar 13, 2025 · 2 comments

Comments

@bedanar
Copy link

bedanar commented Mar 13, 2025

I have built ACTS with the following commands:
git clone https://github.com/acts-project/acts acts_src
cmake -B acts_build -S acts_src -DCMAKE_PREFIX_PATH=/DD4hep/install/cmake -DACTS_BUILD_UNITTESTS=on -DACTS_BUILD_FATRAS=on -DACTS_BUILD_PLUGIN_DD4HEP=ON -DACTS_BUILD_PLUGIN_FPEMON=ON -DACTS_BUILD_PLUGIN_GEANT4=ON -DACTS_BUILD_PLUGIN_JSON=ON -DACTS_BUILD_FATRAS_GEANT4=ON -DACTS_BUILD_EXAMPLES_DD4HEP=ON -DACTS_BUILD_EXAMPLES_GEANT4=ON -DACTS_BUILD_EXAMPLES_HASHING=ON -DACTS_BUILD_EXAMPLES_PYTHIA8=ON -DACTS_BUILD_EXAMPLES_PYTHON_BINDINGS=ON -DACTS_SETUP_EIGEN3=ON -DLCIO_DIR=LCIO/lib/cmake/LCIO/ -DPython_EXECUTABLE=/.cache/pypoetry/virtualenvs/nvalieva-c6oT38Gf-py3.12/bin/python -DEDM4HEP_INCLUDE_DIR=/EDM4hep/install -DDD4HEP_INCLUDE_DIR=/DD4hep
cmake --build acts_build

And then ran source acts_build/python/setup.sh, it outputted:

INFO:    Found OpenDataDetector and set it up
INFO:    Acts Python 3.12 bindings setup complete.

but when I try to run python acts_src/Examples/Scripts/Python/ckf_tracks.py, I have and error:

Traceback (most recent call last):
  File "/home/nvalieva/acts-naf/acts_src/Examples/Scripts/Python/ckf_tracks.py", line 6, in <module>
    import acts
  File "/home/nvalieva/acts-naf/acts_build/python/acts/__init__.py", line 7, in <module>
    from .ActsPythonBindings import *
ModuleNotFoundError: No module named 'acts.ActsPythonBindings'

OS: Ubuntu 24.04.1 GNU/Linux 6.11.0-19-generic x86_64
Root version: 6.32.04

Could you please help to find out what is the problem?

@paulgessinger
Copy link
Member

Hi @bedanar!

  • Can you check which version of python you're running this with? It needs to be the same python that ACTS was built with.
  • Can you check the contents of /home/nvalieva/acts-naf/acts_build/python/acts/ and see if the required .so files are present?

@bedanar
Copy link
Author

bedanar commented Mar 13, 2025

@paulgessinger, In /home/nvalieva/acts-naf/acts_build/python/acts/ I have these files:

ActsPythonBindingsDD4hep.cpython-312-x86_64-linux-gnu.so  __init__.py  _adapter.py
ActsPythonBindingsGeant4.cpython-312-x86_64-linux-gnu.so  __pycache__  examples

I used python 3.12 from virtual environment /home/nvalieva/.cache/pypoetry/virtualenvs/nvalieva-c6oT38Gf-py3.12/bin/python

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