PyROOT still not working on macOS

Will be PyROOT available on macOS?
Continuing this topic: PyROOT does not work anymore?

Now installed ROOT 6.38.02 via homebrew.

$ . /opt/homebrew/bin/thisroot.sh

$ cat test_root.py
#!/usr/bin/env python3

import ROOT
$ python3 test_root.py
Traceback (most recent call last):
  File "/Users/USER/test_root.py", line 3, in <module>
    import ROOT
  File "/opt/homebrew/Cellar/root/6.38.02/lib/root/ROOT/__init__.py", line 20, in <module>
    import cppyy
  File "/opt/homebrew/Cellar/root/6.38.02/lib/root/cppyy/__init__.py", line 74, in <module>
    from ._cpython_cppyy import *
  File "/opt/homebrew/Cellar/root/6.38.02/lib/root/cppyy/_cpython_cppyy.py", line 26, in <module>
    import cppyy.libcppyy as _backend
ImportError: dlopen(/opt/homebrew/Cellar/root/6.38.02/lib/root/cppyy/libcppyy.so, 0x0002): symbol not found in flat namespace '_PyUnstable_Object_IsUniqueReferencedTemporary'

ROOT Version: 6.38.02
Platform: macOS


The PyUnstable_Object_IsUniqueReferencedTemporary symbol that is not found is only available starting from Python 3.14.

Looks like homebrew is indeed building ROOT against Python 3.14. I guess you need to make sure to use the same Python version.

homebrew install python 3.14 bottle but do not use it.
What it the ROOT installation method which guarantees PyROOT work?
Installation from sources still does not work – checked right now.

$ ./test_root.py
Traceback (most recent call last):
  File "/Users/USER/./test_root.py", line 3, in <module>
    import ROOT
  File "/Users/USER/soft/root_install/lib/ROOT/__init__.py", line 25, in <module>
    import cppyy
  File "/Users/USER/soft/root_install/lib/cppyy/__init__.py", line 88, in <module>
    from ._cpython_cppyy import *
  File "/Users/USER/soft/root_install/lib/cppyy/_cpython_cppyy.py", line 24, in <module>
    c = loader.load_cpp_backend()
  File "/Users/USER/soft/root_install/lib/cppyy_backend/loader.py", line 100, in load_cpp_backend
    raise RuntimeError("could not load cppyy_backend library, details:\n%s" %
        '\n'.join(['  '+x for x in err]))
RuntimeError: could not load cppyy_backend library, details:
  dlopen(/Users/USER/soft/root_install/lib/cppyy_backend/lib/libcppyy_backend.so, 0x000A): tried: '/Users/USER/soft/root_install/lib/cppyy_backend/lib/libcppyy_backend.so' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/USER/soft/root_install/lib/cppyy_backend/lib/libcppyy_backend.so' (no such file), '/Users/USER/soft/root_install/lib/cppyy_backend/lib/libcppyy_backend.so' (no such file)
  dlopen(libcppyy_backend.cpython-313-darwin.so, 0x000A): tried: 'libcppyy_backend.cpython-313-darwin.so' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibcppyy_backend.cpython-313-darwin.so' (no such file), '/usr/lib/libcppyy_backend.cpython-313-darwin.so' (no such file, not in dyld cache), 'libcppyy_backend.cpython-313-darwin.so' (no such file)
  dlopen(libcppyy_backend.so, 0x000A): tried: 'libcppyy_backend.so' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibcppyy_backend.so' (no such file), '/usr/lib/libcppyy_backend.so' (no such file, not in dyld cache), 'libcppyy_backend.so' (no such file)
  dlopen(/Users/USER/soft/root_install/lib/cppyy_backend/lib/libcppyy_backend.cpython-313-darwin.so, 0x000A): tried: '/Users/USER/soft/root_install/lib/cppyy_backend/lib/libcppyy_backend.cpython-313-darwin.so' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/USER/soft/root_install/lib/cppyy_backend/lib/libcppyy_backend.cpython-313-darwin.so' (no such file), '/Users/USER/soft/root_install/lib/cppyy_backend/lib/libcppyy_backend.cpython-313-darwin.so' (no such file)