Import ROOT fails on precompiled root-v6.32.06


_ROOT Version: 6.32.06
_Platform: ubuntu 24.04.01 (actually Kubuntu 24.04.01, but that shouldn’t matter)
_Compiler: gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0


Hi, I downloaded and installed the pre-compiled root version 6.32.06
root_v6.32.06.Linux-ubuntu24.04-x86_64-gcc13.2.tar.gz

import ROOT fails:
$ python3
Python 3.12.3 (main, Sep 11 2024, 14:17:37) [GCC 13.2.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import ROOT
Traceback (most recent call last):
File “”, line 1, in
File “/mnt/nfs_share/research/opt/root_6_32_06/lib/ROOT/init.py”, line 27, in
import libROOTPythonizations
ImportError: libtbb.so.12: cannot open shared object file: No such file or directory

despite apparently having pyroot compiled in:
$ root-config --features
cxx17 asimage builtin_afterimage builtin_clang builtin_cling builtin_cppzmq builtin_llvm builtin_openui5 builtin_unuran builtin_zeromq clad dataframe test_distrdf_pyspark test_distrdf_dask davix fftw3 fitsio fortran gdml http imt mathmore mysql opengl pgsql pyroot roofit roofit_multiprocess webgui root7 rpath runtime_cxxmodules shared sqlite ssl tmva tmva-pymva spectrum unfold unuran vdt x11 xml xrootd

and
$root-config --has-pyroot
yes

my libraries:
$ echo $LD_LIBRARY_PATH| tr “:” “\n”
/opt/pythia8305/lib
/opt/hepmc3/lib
/opt/boost_1_86_0/stage/lib
/opt/root_6_32_06/lib

and indeed, in /opt/root_6_32_06/lib/
there is no libtbb.so.
(or where should it be?)

I might not have the environment correctly set up for pyroot, but I don’t how to check that.
root itself seems to work ok.

there is no mismatch with my python version
root-config --python3-version 3.12.3 python3 --version
Python 3.12.3

Thanks for any help!

sorry, there is a mismatch in the traceback from the import ROOT, where it says
File “/mnt/nfs_share/research/opt/root_6_32_06/lib/ROOT/init.py”, line 27
That’s because I first saw the error on a system where /opt is nfs mounted.
But it also happens on the server where /opt is local. I just copied the wrong
traceback.

Hi @haimo,

Thank you for your question. It seems like a dependency is missing. You can try this solution: After installing root 6.12 on ubuntu 17, received an error regarding a missing file upon running root - #3 by amadio

Cheers,
Devajith

Hi,

@devajith is right. Your analysis of the problem is good, but I believe the problem is

ImportError: libtbb.so.12: cannot open shared object file: No such file or directory

You can fix this with this command

apt install libtbb

As a strategy, we rely as much as possible on system libraries.

Cheers,
D

apt does not find libtbb:

$ sudo apt install libtbb
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
E: Unable to locate package libtbb

What gives? I assume libtbb is part of the Intel Thread Building Blocks,
if so, how does that relate to pyroot?

Hi,

Sorry, my bad, I meant

apt install libtbb-dev

The library is linked to libCore, therefore to anything in ROOT, since it’s the engine we use to express task parallelism.

Cheers,
D

PS

Thanks! That solved it of course.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.