Home | News | Documentation | Download

Cannot import ROOT 6.22 in Python 3.9.1 "could not load cppyy_backend library"

Hi all.
I just installed ROOT using Homebrew and I cannot import it in python3, getting the following error:

'>>> import ROOT
Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/Cellar/root/6.22.06_2/lib/root/ROOT/init.py”, line 22, in
import cppyy
File “/usr/local/Cellar/root/6.22.06_2/lib/root/cppyy/init.py”, line 131, in
from ._cpython_cppyy import *
File “/usr/local/Cellar/root/6.22.06_2/lib/root/cppyy/_cpython_cppyy.py”, line 18, in
c = loader.load_cpp_backend()
File “/usr/local/Cellar/root/6.22.06_2/lib/root/cppyy_backend/loader.py”, line 74, in load_cpp_backend
raise RuntimeError(“could not load cppyy_backend library”)
RuntimeError: could not load cppyy_backend library

ROOT Version: 6.22/06
Platform: OSX Catalina 10.15.7
Compiler: Homebrew GCC 10.2.0_3

Thank you for your help

Luca

Hi @mole.luca,

It seems that libcppyy_backend.so or any of its dependencies failed to load. Could you please confirm that your build includes that library by running the following command?

$ find /usr/local/Cellar/root/6.22.06_2/ -name 'libcppyy_backend*'

If it does, you can check that any dependencies are found in your DYLD_LIBRARY_PATH. The output of ldd should show no “file not found” lines. Could you please verify that?

$ ldd /path/to/cppyy_backend.so/as/provided/by/find

Cheers,
J.

Hi @jalopezg. Thank you for the help.
Indeed I could locate the libcppyy_backend.so file and I run the ld command as you suggested. Here the output:

ld: warning: platform not specified
ld: warning: -arch not specified
ld: warning: No platform min-version specified on command line
ld: warning: ignoring file /usr/local/Cellar/root/6.22.06_2//lib/root/libcppyy_backend3_9.so, building for -unknown but attempting to link with file built for macOS-x86_64
Undefined symbols for architecture unknown:
“_main”, referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture unknown

Kind regards

Luca

Hi @mole.luca,

Sorry for the delay in this reply. You need to run ldd (dynamic library dump) -not ld, i.e., the linker from your compiler toolchain. To this end, you can run:

$ ldd /usr/local/Cellar/root/6.22.06_2/lib/root/libcppyy_backend3_9.so

Cheers,
J.

Hi @jalopezg. Thank you for the answer. Apparently there is no ldd in Mac. Looking it the internet I could find a suggestion that the command otool -L could do the job. I tried and this is the output.

/usr/local/Cellar/root/6.22.06_2/lib/root/libcppyy_backend3_9.so:
/usr/local/opt/root/lib/root/libcppyy_backend3_9.so (compatibility version 0.0.0, current version 0.0.0)
@rpath/libCore.so (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 902.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)

I hope this is what you meant.
Kind regards

Luca

Hi @mole.luca,

Sorry for the delay in the reply. The output looks good to me, except the 0.0.0 in both, compatibility version and current version (in libcppyy_backend3_9.so and libCore.so), which looks weird.

Could you please also attach the output of the following commands?

$ otool -hvl /usr/local/Cellar/root/6.22.06_2/lib/root/libcppyy_backend3_9.so
$ otool -hvlL /usr/local/Cellar/root/6.22.06_2/lib/root/libCore.so

I am sure @etejedor could give you a more definitive answer. Unfortunately, he is off until April.

Cheers,
J.

Hi @jalopezg. Thank you for the reply. Here are the outputs that you requested.
Kind regards

> /usr/local/Cellar/root/6.22.06_2/lib/root/libcppyy_backend3_9.so:
Mach header
      magic cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
MH_MAGIC_64  X86_64        ALL  0x00       DYLIB    17       1872   NOUNDEFS DYLDLINK TWOLEVEL WEAK_DEFINES BINDS_TO_WEAK NO_REEXPORTED_DYLIBS
Load command 0
      cmd LC_SEGMENT_64
  cmdsize 632
  segname __TEXT
   vmaddr 0x0000000000000000
   vmsize 0x0000000000030000
  fileoff 0
 filesize 196608
  maxprot r-x
 initprot r-x
   nsects 7
    flags (none)
Section
  sectname __text
   segname __TEXT
      addr 0x0000000000004f90
      size 0x00000000000275bc
    offset 20368
     align 2^4 (16)
    reloff 0
    nreloc 0
      type S_REGULAR
attributes PURE_INSTRUCTIONS SOME_INSTRUCTIONS
 reserved1 0
 reserved2 0
Section
  sectname __stubs
   segname __TEXT
      addr 0x000000000002c54c
      size 0x00000000000005ee
    offset 181580
     align 2^1 (2)
    reloff 0
    nreloc 0
      type S_SYMBOL_STUBS
attributes PURE_INSTRUCTIONS SOME_INSTRUCTIONS
 reserved1 0 (index into indirect symbol table)
 reserved2 6 (size of stubs)
Section
  sectname __stub_helper
   segname __TEXT
      addr 0x000000000002cb3c
      size 0x000000000000052e
    offset 183100
     align 2^2 (4)
    reloff 0
    nreloc 0
      type S_REGULAR
attributes PURE_INSTRUCTIONS SOME_INSTRUCTIONS
 reserved1 0
 reserved2 0
Section
  sectname __gcc_except_tab
   segname __TEXT
      addr 0x000000000002d06c
      size 0x00000000000015a8
    offset 184428
     align 2^2 (4)
    reloff 0
    nreloc 0
      type S_REGULAR
attributes (none)
 reserved1 0
 reserved2 0
Section
  sectname __const
   segname __TEXT
      addr 0x000000000002e618
      size 0x00000000000000d4
    offset 189976
     align 2^3 (8)
    reloff 0
    nreloc 0
      type S_REGULAR
attributes (none)
 reserved1 0
 reserved2 0
Section
  sectname __cstring
   segname __TEXT
      addr 0x000000000002e6ec
      size 0x0000000000000cee
    offset 190188
     align 2^0 (1)
    reloff 0
    nreloc 0
      type S_CSTRING_LITERALS
attributes (none)
 reserved1 0
 reserved2 0
Section
  sectname __unwind_info
   segname __TEXT
      addr 0x000000000002f3dc
      size 0x0000000000000c20
    offset 193500
     align 2^2 (4)
    reloff 0
    nreloc 0
      type S_REGULAR
attributes (none)
 reserved1 0
 reserved2 0
Load command 1
      cmd LC_SEGMENT_64
  cmdsize 312
  segname __DATA_CONST
   vmaddr 0x0000000000030000
   vmsize 0x0000000000004000
  fileoff 196608
 filesize 16384
  maxprot rw-
 initprot rw-
   nsects 3
    flags 0x00000010 (unknown flags)
Section
  sectname __got
   segname __DATA_CONST
      addr 0x0000000000030000
      size 0x00000000000000b0
    offset 196608
     align 2^3 (8)
    reloff 0
    nreloc 0
      type S_NON_LAZY_SYMBOL_POINTERS
attributes (none)
 reserved1 253 (index into indirect symbol table)
 reserved2 0
Section
  sectname __mod_init_func
   segname __DATA_CONST
      addr 0x00000000000300b0
      size 0x0000000000000008
    offset 196784
     align 2^3 (8)
    reloff 0
    nreloc 0
      type S_MOD_INIT_FUNC_POINTERS
attributes (none)
 reserved1 0
 reserved2 0
Section
  sectname __const
   segname __DATA_CONST
      addr 0x00000000000300c0
      size 0x00000000000005e8
    offset 196800
     align 2^4 (16)
    reloff 0
    nreloc 0
      type S_REGULAR
attributes (none)
 reserved1 0
 reserved2 0
Load command 2
      cmd LC_SEGMENT_64
  cmdsize 312
  segname __DATA
   vmaddr 0x0000000000034000
   vmsize 0x0000000000004000
  fileoff 212992
 filesize 16384
  maxprot rw-
 initprot rw-
   nsects 3
    flags (none)
Section
  sectname __la_symbol_ptr
   segname __DATA
      addr 0x0000000000034000
      size 0x00000000000007e8
    offset 212992
     align 2^3 (8)
    reloff 0
    nreloc 0
      type S_LAZY_SYMBOL_POINTERS
attributes (none)
 reserved1 275 (index into indirect symbol table)
 reserved2 0
Section
  sectname __data
   segname __DATA
      addr 0x00000000000347f0
      size 0x0000000000000120
    offset 215024
     align 2^4 (16)
    reloff 0
    nreloc 0
      type S_REGULAR
attributes (none)
 reserved1 0
 reserved2 0
Section
  sectname __bss
   segname __DATA
      addr 0x0000000000034910
      size 0x0000000000000130
    offset 0
     align 2^3 (8)
    reloff 0
    nreloc 0
      type S_ZEROFILL
attributes (none)
 reserved1 0
 reserved2 0
Load command 3
      cmd LC_SEGMENT_64
  cmdsize 72
  segname __LINKEDIT
   vmaddr 0x0000000000038000
   vmsize 0x000000000003c000
  fileoff 229376
 filesize 245048
  maxprot r--
 initprot r--
   nsects 0
    flags (none)
Load command 4
          cmd LC_ID_DYLIB
      cmdsize 80
         name /usr/local/opt/root/lib/root/libcppyy_backend3_9.so (offset 24)
   time stamp 1608654871 Tue Dec 22 18:34:31 2020
      current version 0.0.0
compatibility version 0.0.0
Load command 5
            cmd LC_DYLD_INFO_ONLY
        cmdsize 48
     rebase_off 229376
    rebase_size 56
       bind_off 229432
      bind_size 1624
  weak_bind_off 231056
 weak_bind_size 14272
  lazy_bind_off 245328
 lazy_bind_size 5848
     export_off 251176
    export_size 14320
Load command 6
     cmd LC_SYMTAB
 cmdsize 24
  symoff 267424
   nsyms 2076
  stroff 302752
 strsize 171672
Load command 7
            cmd LC_DYSYMTAB
        cmdsize 80
      ilocalsym 0
      nlocalsym 1592
     iextdefsym 1592
     nextdefsym 314
      iundefsym 1906
      nundefsym 170
         tocoff 0
           ntoc 0
      modtaboff 0
        nmodtab 0
   extrefsymoff 0
    nextrefsyms 0
 indirectsymoff 300640
  nindirectsyms 528
      extreloff 0
        nextrel 0
      locreloff 0
        nlocrel 0
Load command 8
     cmd LC_UUID
 cmdsize 24
    uuid 6914C2FC-DD7E-30B7-AC45-4B8368C4097F
Load command 9
       cmd LC_BUILD_VERSION
   cmdsize 32
  platform macos
       sdk 10.15.6
     minos 10.15
    ntools 1
      tool ld
   version 609.8
Load command 10
      cmd LC_SOURCE_VERSION
  cmdsize 16
  version 0.0
Load command 11
          cmd LC_LOAD_DYLIB
      cmdsize 48
         name @rpath/libCore.so (offset 24)
   time stamp 2 Thu Jan  1 02:00:02 1970
      current version 0.0.0
compatibility version 0.0.0
Load command 12
          cmd LC_LOAD_DYLIB
      cmdsize 48
         name /usr/lib/libc++.1.dylib (offset 24)
   time stamp 2 Thu Jan  1 02:00:02 1970
      current version 902.1.0
compatibility version 1.0.0
Load command 13
          cmd LC_LOAD_DYLIB
      cmdsize 56
         name /usr/lib/libSystem.B.dylib (offset 24)
   time stamp 2 Thu Jan  1 02:00:02 1970
      current version 1281.100.1
compatibility version 1.0.0
Load command 14
      cmd LC_FUNCTION_STARTS
  cmdsize 16
  dataoff 265496
 datasize 1928
Load command 15
      cmd LC_DATA_IN_CODE
  cmdsize 16
  dataoff 267424
 datasize 0
Load command 16
          cmd LC_RPATH
      cmdsize 56
         path /usr/local/Cellar/root/6.22.06_2/lib/root (offset 12)

> /usr/local/Cellar/root/6.22.06_2/lib/root/libCore.so:
	/usr/local/opt/root/lib/root/libCore.so (compatibility version 0.0.0, current version 0.0.0)
	/usr/local/opt/pcre/lib/libpcre.1.dylib (compatibility version 4.0.0, current version 4.12.0)
	/usr/local/opt/xz/lib/liblzma.5.dylib (compatibility version 8.0.0, current version 8.5.0)
	/usr/local/opt/lz4/lib/liblz4.1.dylib (compatibility version 1.0.0, current version 1.9.3)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
	/usr/local/opt/zstd/lib/libzstd.1.dylib (compatibility version 1.0.0, current version 1.4.8)
	/System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSymbolication (compatibility version 1.0.0, current version 64535.33.2)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 902.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)
	/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1894.60.100)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1677.104.0)
	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1677.104.0)
	/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
Mach header
      magic cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
MH_MAGIC_64  X86_64        ALL  0x00       DYLIB    26       3616   NOUNDEFS DYLDLINK TWOLEVEL WEAK_DEFINES BINDS_TO_WEAK NO_REEXPORTED_DYLIBS MH_HAS_TLV_DESCRIPTORS
Load command 0
      cmd LC_SEGMENT_64
  cmdsize 872
  segname __TEXT
   vmaddr 0x0000000000000000
   vmsize 0x0000000000380000
  fileoff 0
 filesize 3670016
  maxprot r-x
 initprot r-x
   nsects 10
    flags (none)
Section
  sectname __text
   segname __TEXT
      addr 0x0000000000006f70
      size 0x00000000003331e9
    offset 28528
     align 2^4 (16)
    reloff 0
    nreloc 0
      type S_REGULAR
attributes PURE_INSTRUCTIONS SOME_INSTRUCTIONS
 reserved1 0
 reserved2 0
Section
  sectname __stubs
   segname __TEXT
      addr 0x000000000033a15a
      size 0x0000000000002de4
    offset 3383642
     align 2^1 (2)
    reloff 0
    nreloc 0
      type S_SYMBOL_STUBS
attributes PURE_INSTRUCTIONS SOME_INSTRUCTIONS
 reserved1 0 (index into indirect symbol table)
 reserved2 6 (size of stubs)
Section
  sectname __stub_helper
   segname __TEXT
      addr 0x000000000033cf40
      size 0x0000000000000d8a
    offset 3395392
     align 2^2 (4)
    reloff 0
    nreloc 0
      type S_REGULAR
attributes PURE_INSTRUCTIONS SOME_INSTRUCTIONS
 reserved1 0
 reserved2 0
Section
  sectname __gcc_except_tab
   segname __TEXT
      addr 0x000000000033dccc
      size 0x00000000000154ec
    offset 3398860
     align 2^2 (4)
    reloff 0
    nreloc 0
      type S_REGULAR
attributes (none)
 reserved1 0
 reserved2 0
Section
  sectname __cstring
   segname __TEXT
      addr 0x00000000003531b8
      size 0x000000000001534e
    offset 3486136
     align 2^0 (1)
    reloff 0
    nreloc 0
      type S_CSTRING_LITERALS
attributes (none)
 reserved1 0
 reserved2 0
Section
  sectname __const
   segname __TEXT
      addr 0x0000000000368510
      size 0x000000000000b394
    offset 3573008
     align 2^4 (16)
    reloff 0
    nreloc 0
      type S_REGULAR
attributes (none)
 reserved1 0
 reserved2 0
Section
  sectname __objc_methname
   segname __TEXT
      addr 0x00000000003738a4
      size 0x000000000000012e
    offset 3618980
     align 2^0 (1)
    reloff 0
    nreloc 0
      type S_CSTRING_LITERALS
attributes (none)
 reserved1 0
 reserved2 0
Section
  sectname __objc_classname
   segname __TEXT
      addr 0x00000000003739d2
      size 0x000000000000000b
    offset 3619282
     align 2^0 (1)
    reloff 0
    nreloc 0
      type S_CSTRING_LITERALS
attributes (none)
 reserved1 0
 reserved2 0
Section
  sectname __objc_methtype
   segname __TEXT
      addr 0x00000000003739dd
      size 0x0000000000000008
    offset 3619293
     align 2^0 (1)
    reloff 0
    nreloc 0
      type S_CSTRING_LITERALS
attributes (none)
 reserved1 0
 reserved2 0
Section
  sectname __unwind_info
   segname __TEXT
      addr 0x00000000003739e8
      size 0x000000000000c610
    offset 3619304
     align 2^2 (4)
    reloff 0
    nreloc 0
      type S_REGULAR
attributes (none)
 reserved1 0
 reserved2 0
Load command 1
      cmd LC_SEGMENT_64
  cmdsize 472
  segname __DATA_CONST
   vmaddr 0x0000000000380000
   vmsize 0x0000000000028000
  fileoff 3670016
 filesize 163840
  maxprot rw-
 initprot rw-
   nsects 5
    flags 0x00000010 (unknown flags)
Section
  sectname __got
   segname __DATA_CONST
      addr 0x0000000000380000
      size 0x0000000000002258
    offset 3670016
     align 2^3 (8)
    reloff 0
    nreloc 0
      type S_NON_LAZY_SYMBOL_POINTERS
attributes (none)
 reserved1 1958 (index into indirect symbol table)
 reserved2 0
Section
  sectname __mod_init_func
   segname __DATA_CONST
      addr 0x0000000000382258
      size 0x00000000000004f8
    offset 3678808
     align 2^3 (8)
    reloff 0
    nreloc 0
      type S_MOD_INIT_FUNC_POINTERS
attributes (none)
 reserved1 0
 reserved2 0
Section
  sectname __const
   segname __DATA_CONST
      addr 0x0000000000382750
      size 0x00000000000248e0
    offset 3680080
     align 2^4 (16)
    reloff 0
    nreloc 0
      type S_REGULAR
attributes (none)
 reserved1 0
 reserved2 0
Section
  sectname __objc_classlist
   segname __DATA_CONST
      addr 0x00000000003a7030
      size 0x0000000000000008
    offset 3829808
     align 2^3 (8)
    reloff 0
    nreloc 0
      type S_REGULAR
attributes NO_DEAD_STRIP
 reserved1 0
 reserved2 0
Section
  sectname __objc_imageinfo
   segname __DATA_CONST
      addr 0x00000000003a7038
      size 0x0000000000000008
    offset 3829816
     align 2^2 (4)
    reloff 0
    nreloc 0
      type S_REGULAR
attributes (none)
 reserved1 0
 reserved2 0
Load command 2
      cmd LC_SEGMENT_64
  cmdsize 952
  segname __DATA
   vmaddr 0x00000000003a8000
   vmsize 0x0000000000040000
  fileoff 3833856
 filesize 32768
  maxprot rw-
 initprot rw-
   nsects 11
    flags (none)
Section
  sectname __la_symbol_ptr
   segname __DATA
      addr 0x00000000003a8000
      size 0x0000000000003d30
    offset 3833856
     align 2^3 (8)
    reloff 0
    nreloc 0
      type S_LAZY_SYMBOL_POINTERS
attributes (none)
 reserved1 3057 (index into indirect symbol table)
 reserved2 0
Section
  sectname __objc_const
   segname __DATA
      addr 0x00000000003abd30
      size 0x00000000000000b0
    offset 3849520
     align 2^3 (8)
    reloff 0
    nreloc 0
      type S_REGULAR
attributes (none)
 reserved1 0
 reserved2 0
Section
  sectname __objc_selrefs
   segname __DATA
      addr 0x00000000003abde0
      size 0x0000000000000068
    offset 3849696
     align 2^3 (8)
    reloff 0
    nreloc 0
      type S_LITERAL_POINTERS
attributes NO_DEAD_STRIP
 reserved1 0
 reserved2 0
Section
  sectname __objc_classrefs
   segname __DATA
      addr 0x00000000003abe48
      size 0x0000000000000028
    offset 3849800
     align 2^3 (8)
    reloff 0
    nreloc 0
      type S_REGULAR
attributes NO_DEAD_STRIP
 reserved1 0
 reserved2 0
Section
  sectname __objc_data
   segname __DATA
      addr 0x00000000003abe70
      size 0x0000000000000050
    offset 3849840
     align 2^3 (8)
    reloff 0
    nreloc 0
      type S_REGULAR
attributes (none)
 reserved1 0
 reserved2 0
Section
  sectname __data
   segname __DATA
      addr 0x00000000003abec0
      size 0x0000000000001d36
    offset 3849920
     align 2^4 (16)
    reloff 0
    nreloc 0
      type S_REGULAR
attributes (none)
 reserved1 0
 reserved2 0
Section
  sectname __thread_vars
   segname __DATA
      addr 0x00000000003adbf8
      size 0x0000000000000360
    offset 3857400
     align 2^3 (8)
    reloff 0
    nreloc 0
      type S_THREAD_LOCAL_VARIABLES
attributes (none)
 reserved1 0
 reserved2 0
Section
  sectname __thread_data
   segname __DATA
      addr 0x00000000003adf60
      size 0x0000000000000009
    offset 3858272
     align 2^4 (16)
    reloff 0
    nreloc 0
      type S_THREAD_LOCAL_REGULAR
attributes (none)
 reserved1 0
 reserved2 0
Section
  sectname __thread_bss
   segname __DATA
      addr 0x00000000003adf70
      size 0x0000000000003a39
    offset 0
     align 2^4 (16)
    reloff 0
    nreloc 0
      type S_THREAD_LOCAL_ZEROFILL
attributes (none)
 reserved1 0
 reserved2 0
Section
  sectname __bss
   segname __DATA
      addr 0x00000000003b19b0
      size 0x00000000000324e9
    offset 0
     align 2^4 (16)
    reloff 0
    nreloc 0
      type S_ZEROFILL
attributes (none)
 reserved1 0
 reserved2 0
Section
  sectname __common
   segname __DATA
      addr 0x00000000003e3ea0
      size 0x0000000000000a70
    offset 0
     align 2^4 (16)
    reloff 0
    nreloc 0
      type S_ZEROFILL
attributes (none)
 reserved1 0
 reserved2 0
Load command 3
      cmd LC_SEGMENT_64
  cmdsize 72
  segname __LINKEDIT
   vmaddr 0x00000000003e8000
   vmsize 0x00000000002f4000
  fileoff 3866624
 filesize 3083256
  maxprot r--
 initprot r--
   nsects 0
    flags (none)
Load command 4
          cmd LC_ID_DYLIB
      cmdsize 64
         name /usr/local/opt/root/lib/root/libCore.so (offset 24)
   time stamp 1608654851 Tue Dec 22 18:34:11 2020
      current version 0.0.0
compatibility version 0.0.0
Load command 5
            cmd LC_DYLD_INFO_ONLY
        cmdsize 48
     rebase_off 3866624
    rebase_size 3040
       bind_off 3869664
      bind_size 5864
  weak_bind_off 3875528
 weak_bind_size 210208
  lazy_bind_off 4085736
 lazy_bind_size 10472
     export_off 4096208
    export_size 315160
Load command 6
     cmd LC_SYMTAB
 cmdsize 24
  symoff 4447528
   nsyms 39762
  stroff 5103784
 strsize 1846096
Load command 7
            cmd LC_DYSYMTAB
        cmdsize 80
      ilocalsym 0
      nlocalsym 29264
     iextdefsym 29264
     nextdefsym 10047
      iundefsym 39311
      nundefsym 451
         tocoff 0
           ntoc 0
      modtaboff 0
        nmodtab 0
   extrefsymoff 0
    nextrefsyms 0
 indirectsymoff 5083720
  nindirectsyms 5015
      extreloff 0
        nextrel 0
      locreloff 0
        nlocrel 0
Load command 8
     cmd LC_UUID
 cmdsize 24
    uuid FD1D4B90-44D5-36EE-95D7-BE83C07E39AE
Load command 9
       cmd LC_BUILD_VERSION
   cmdsize 32
  platform macos
       sdk 10.15.6
     minos 10.15
    ntools 1
      tool ld
   version 609.8
Load command 10
      cmd LC_SOURCE_VERSION
  cmdsize 16
  version 0.0
Load command 11
          cmd LC_LOAD_DYLIB
      cmdsize 64
         name /usr/local/opt/pcre/lib/libpcre.1.dylib (offset 24)
   time stamp 2 Thu Jan  1 02:00:02 1970
      current version 4.12.0
compatibility version 4.0.0
Load command 12
          cmd LC_LOAD_DYLIB
      cmdsize 64
         name /usr/local/opt/xz/lib/liblzma.5.dylib (offset 24)
   time stamp 2 Thu Jan  1 02:00:02 1970
      current version 8.5.0
compatibility version 8.0.0
Load command 13
          cmd LC_LOAD_DYLIB
      cmdsize 64
         name /usr/local/opt/lz4/lib/liblz4.1.dylib (offset 24)
   time stamp 2 Thu Jan  1 02:00:02 1970
      current version 1.9.3
compatibility version 1.0.0
Load command 14
          cmd LC_LOAD_DYLIB
      cmdsize 48
         name /usr/lib/libz.1.dylib (offset 24)
   time stamp 2 Thu Jan  1 02:00:02 1970
      current version 1.2.11
compatibility version 1.0.0
Load command 15
          cmd LC_LOAD_DYLIB
      cmdsize 64
         name /usr/local/opt/zstd/lib/libzstd.1.dylib (offset 24)
   time stamp 2 Thu Jan  1 02:00:02 1970
      current version 1.4.8
compatibility version 1.0.0
Load command 16
          cmd LC_LOAD_DYLIB
      cmdsize 120
         name /System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSymbolication (offset 24)
   time stamp 2 Thu Jan  1 02:00:02 1970
      current version 64535.33.2
compatibility version 1.0.0
Load command 17
          cmd LC_LOAD_DYLIB
      cmdsize 48
         name /usr/lib/libc++.1.dylib (offset 24)
   time stamp 2 Thu Jan  1 02:00:02 1970
      current version 902.1.0
compatibility version 1.0.0
Load command 18
          cmd LC_LOAD_DYLIB
      cmdsize 56
         name /usr/lib/libSystem.B.dylib (offset 24)
   time stamp 2 Thu Jan  1 02:00:02 1970
      current version 1281.100.1
compatibility version 1.0.0
Load command 19
          cmd LC_LOAD_DYLIB
      cmdsize 88
         name /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (offset 24)
   time stamp 2 Thu Jan  1 02:00:02 1970
      current version 1894.60.100
compatibility version 45.0.0
Load command 20
          cmd LC_LOAD_DYLIB
      cmdsize 104
         name /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (offset 24)
   time stamp 2 Thu Jan  1 02:00:02 1970
      current version 1677.104.0
compatibility version 150.0.0
Load command 21
          cmd LC_LOAD_DYLIB
      cmdsize 96
         name /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (offset 24)
   time stamp 2 Thu Jan  1 02:00:02 1970
      current version 1677.104.0
compatibility version 300.0.0
Load command 22
          cmd LC_LOAD_DYLIB
      cmdsize 56
         name /usr/lib/libobjc.A.dylib (offset 24)
   time stamp 2 Thu Jan  1 02:00:02 1970
      current version 228.0.0
compatibility version 1.0.0
Load command 23
      cmd LC_FUNCTION_STARTS
  cmdsize 16
  dataoff 4411368
 datasize 34712
Load command 24
      cmd LC_DATA_IN_CODE
  cmdsize 16
  dataoff 4446080
 datasize 1448
Load command 25
          cmd LC_RPATH
      cmdsize 56
         path /usr/local/Cellar/root/6.22.06_2/lib/root (offset 12)

Indeed, @etejedor would probably know - but until then you might want to check with the Homebrew folks (you shouldn’t be the first to notice this) or you can try with the following workaround: export CPPYY_BACKEND_LIBRARY=/usr/local/Cellar/root/6.22.06_2/lib/root/libcppyy_backend3_9.so and then starting Python.

Thank you @Axel, your workoround works!
I could at least import ROOT in python. I hope I will not encounter further issues.
Regards and thanks to everyone.
By the way, where I can contact the homebrew folks?

GitHub - Homebrew/discussions: 🗣 Public open-ended discussions. Replacement for our Discourse. could be a good starting point.

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