Failed to import libcppyy2_7

Hi,
I want to import ROOT in Python on a virtual linux machine (Centos7).

  • Installed python2, root-core and python2-root packages via yum (from EPEL repository).
  • All the required files seem to be there
    ls -l /usr/lib64/python2.7/site-packages/
    total 140
    drwxr-xr-x. 3 root root 4096 May 4 14:04 cppyy
    drwxr-xr-x. 3 root root 4096 May 4 14:04 cppyy_backend
    lrwxrwxrwx. 1 root root 33 Mar 19 06:48 libcppyy2_7.so → …/…/root/libcppyy2_7.so.6.22.08
    lrwxrwxrwx. 1 root root 41 Mar 19 06:48 libcppyy_backend2_7.so → …/…/root/libcppyy_backend2_7.so.6.22.08
    -rwxr-xr-x. 1 root root 125192 Mar 19 08:27 libROOTPythonizations2_7.so
    -rw-r–r–. 1 root root 119 Aug 31 2020 README
    drwxr-xr-x. 4 root root 4096 May 4 14:04 ROOT
    -rw-r–r–. 1 root root 0 Mar 19 06:48 ROOT-6.22.08.egg-info

But I get this
Python 2.7.17 (default, Aug 31 2020, 21:02:14)
[GCC 8.3.1 20191121 (Red Hat 8.3.1-5)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

import ROOT
Traceback (most recent call last):
File “”, line 1, in
File “/usr/lib64/python2.7/site-packages/ROOT/init.py”, line 28, in
import cppyy
File “/usr/lib64/python2.7/site-packages/cppyy/init.py”, line 64, in
libcppyy_mod_name, major, minor))
ImportError: Failed to import libcppyy2_7. Please check that ROOT has been built for Python 2.7

Do you have any idea how to fix this problem?

I’m sure @etejedor can help you

This should not happen, I’m asking for the help of the ROOT package maintainer for Centos7 @ellert

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