Hello ROOT experts,
I’m having some problems when importing Root on Python. I have built Root on lxplus to match with the Python version of the environment that I’m using. Therefor there is not a problem with compatibility.
root-config --python-version
3.10.4
However when opening the Python compiler and giving the command import ROOT
, it’s giving me this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/afs/cern.ch/work/m/mzabloud/root/root_install/lib/ROOT/__init__.py", line 39, in <module>
_register_pythonizations()
File "/afs/cern.ch/work/m/mzabloud/root/root_install/lib/ROOT/_pythonization/__init__.py", line 302, in _register_pythonizations
importlib.import_module(__name__ + '.' + module_name)
File "/cvmfs/dunedaq.opensciencegrid.org/spack/externals/ext-v2.0/spack-0.20.0-gcc-12.1.0/spack-0.20.0/opt/spack/linux-almalinux9-x86_64/gcc-12.1.0/python-3.10.4-avttyjcqg3mct6r252fx5mxmff5ddf6z/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/afs/cern.ch/work/m/mzabloud/root/root_install/lib/ROOT/_pythonization/_tmva/__init__.py", line 27, in <module>
from ._batchgenerator import (
ModuleNotFoundError: No module named 'ROOT._pythonization._tmva._batchgenerator'
_ROOT Version: 6.32.02
_Platform: lxplus alma9
_Compiler: -
Thank you in advance for your advice.
Have a nice day.