Homebrew installed ROOT doesn't work in python noteboook

Running on Mac OS 10.15.17. About 2-3 years ago I installed ROOT via homebrew and that seems to have automatically made import into python notebooks work ( import ROOT worked out of the box ). Recently I did some brew install of some other packages and suddenly I cannot import into python and i get the following error:

I have no idea where to begin… any ideas? Thanks so much. -Scott


Are you using the same python version you used to? Here it seems that Jupyter is using Python 3.8, was you ROOT installation built for Python 3.8? What happens if you do import ROOT from a Python3.8 prompt?

Yes, all python 3.8. When trying to import as you suggested I get the same msg as in my original post.

Separately, I think I may have figured out what happened here. When brew installing some other packages recently brew updated my python to 3.10, causing some other annoying problems, but I think it also updated the requirements (or something for ROOT). The reason I think this is because just trying to open ROOT from the cmd line gave an error:

dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.60.dylib

This i fixed with brew reinstall icu4c. During that step, I believe brew did the same with ROOT, because I got the following

root: A full installation of Xcode.app is required to compile
this software. Installing just the Command Line Tools is not sufficient.

Xcode can be installed from the App Store.
Error: root: An unsatisfied requirement failed this build.

So I guess I don’t have Xcode after all these years?.. I’m running on Mac OSX 10.15.17 and trying to download Xcode from the app store gives me “Xcode can’t be installed on “Macintosh HD” because macOS version 12 or later is required.”

So i’m not sure here now…


Perhaps you should install a version of XCode that is compatible with MacOS 10 ?

This is hinted here:


with a link to download XCode 10.1.

Pinging also @couet since he might know more about configuring ROOT on macOS.

I always install root from source on ROOT. I am lacking expertise with the homebrew environment.


it looks like the tbb libraries you have installed are not compatible with the ROOT version you have installed anymore (probably because of an update to the former ones). Updating to the latest homebrew package for ROOT might fix the issue.


Thanks all for the replies. I did figure this out last night and the solution was indeed to just download a version of Xcode compatible with my current version of MacOSX.

For those that might find this thread, you can download older versions of Xcode via the link a couple replies up ^ . However, the way I ended up doing it was going to “Purchased” on the App Store and hitting the download for Xcode (since I had previously downloaded it). This will start a download for the most up-to-date version that is still compatible with your current OS.

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