ROOT command-line tools are not working

Hello everyone,

I am using

ROOT version:- 6.34.08
Platform:- Apple M1 Sequoia 15.4.1

I have installed ROOT form brew by running brew install --build-from-source root and then when I try to run rootls --help, then the terminal outputs an error as follows:-

Traceback (most recent call last): File "/opt/homebrew/Cellar/root/6.34.08_1/bin/rootls", line 10, in <module> import cmdLineUtils File "/opt/homebrew/Cellar/root/6.34.08_1/lib/root/cmdLineUtils.py", line 80, in <module> import ROOT File "/opt/homebrew/Cellar/root/6.34.08_1/lib/root/ROOT/__init__.py", line 25, in <module> import cppyy File "/opt/homebrew/Cellar/root/6.34.08_1/lib/root/cppyy/__init__.py", line 81, in <module> from ._cpython_cppyy import * File "/opt/homebrew/Cellar/root/6.34.08_1/lib/root/cppyy/_cpython_cppyy.py", line 22, in <module> import libcppyy as _backend ImportError: dlopen(/opt/homebrew/Cellar/root/6.34.08_1/lib/root/libcppyy.so, 0x0002): symbol not found in flat namespace '_PyMapping_GetOptionalItemString'

And it seems that all the ROOT command line tools are having the same error. I am not sure what to do to resolve this issue.

Hi,

Sorry to read the Brew installation did not work out of the box for you.
May I ask why you are building from sources? If you are not interested in developing ROOT, you could use the binary distribution, now fixed for 15.4+XCode 16.3 (mind, we do encourage development of ROOT, it’s open source and free, and we are always keen in receiving contributions!)

My best guess would be a Python version mismatch, e.g. the python version Brew uses to build ROOT is not the one used at runtime and the two are not compatible. Do you manage to use ROOT’s Python interface, e.g. python -c "import ROOT"?

Cheers,
D

I thought that building from source using brew was equivalent to building from source by actually installing the ROOT software from the website. I checked the python versions using python --version and root-config --python-version and I got the following results:-

> python --version
Python 3.13.3
> root-config --python-version
3.13.3

So I know that the Python versions are compatible and I was able to use ROOT’s Python interface.

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