Alright, your advice took me on a little journey with some success! Sorry I couldn’t follow up right away because of pressing things that came up. I was able to get it to work by going here [1], downloading and installing Xcode 15.1 and Command Line Tools for Xcode 15.3 by hand, and then doing
brew install root
After this I can do
mac-1T0-252:~ bein$ root -l
root [0]
however, PyROOT seems to be out of reach. Is there a way to install ROOT from brew but then also be able to do commands like
python3
Python 3.8.5 (v3.8.5:580fbb018f, Jul 20 2020, 12:11:27)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/opt/root/lib/root/ROOT/__init__.py", line 25, in <module>
import cppyy
File "/usr/local/opt/root/lib/root/cppyy/__init__.py", line 81, in <module>
from ._cpython_cppyy import *
File "/usr/local/opt/root/lib/root/cppyy/_cpython_cppyy.py", line 22, in <module>
import libcppyy as _backend
ImportError: dlopen(/usr/local/opt/root/lib/root/libcppyy.so, 0x0002): symbol not found in flat namespace '_PyCMethod_New'
>>>
As I said in this post, the homebrew package is not maintained by the ROOT team. I don’t know who the maintainers are and how much they make sure that it actually works. If you have any problems with it, I would suggest to reach out to to homebrew maintainers directly.
What you could also do is to use ROOT by installing it via the nix package manager. The ROOT package there is developed and tested by us, but the learning curve of nix is admittedly a bit steeper than conda, brew or the like. Sill I wanted to put this option out there as I know it works.
I have tried installing nix and installing root via:
mac-1T0-252:~ bein$ nix-env -iA nixpkgs.root
However, it crashes out with the CMake Generate step, as attached. I’m just a wee bit sad because I’ve been able to install ROOT from source in the past, since that let’s me edit libraries. But any way to be able to run my pyroot scripts would be nice. Thanks again.
Oh that’s not great, I thought it would not be necessary for nix to rebuild root! There should be binaries for that. Did you try to start at temporary shell with root installed, like nix-shell -p root?
Maybe it’s because you are not using Apple silicon, but an old Intel Mac. We don’t have these anymore among the ROOT developers, at least not with macOS 15, so I’m not actually sure if we support this configuration. Intel macs become rarer and rarer these days…