ROOT Installs with Python 3.8.2

I’m unable to use pyROOT and I’ve determined the problem is that ROOT installs with Python 3.8.2, yet I have Python 3.8.3 installed on my computer. I’ve tried reinstalling ROOT via Homebrew, which says it depends on 3.8.3, yet the installation still seems to want a non-existent 3.8.2 binary. Whenever I try to import ROOT in 3.8.3, I get a module not found error. Is there a way to force ROOT to install with 3.8.3? Thanks.

I guess @etejedor can help you.

Try export PYTHONPATH=$(root-config --libdir), and please make sure to use the Python interpreter from Homebrew (i.e. likely from /usr/local/bin and linked somewhere into /usr/local/Cellar).

Perfect. That solved it. Thank you!

This should be easier with ROOT 6.22, I’m working on getting it setup as a nicer Python package, and if you want to use Python 3.8 (which you have to with ROOT’s formula), you still have to access it directly from the full path or add the directory to the path (as done above), since Homebrew still defaults to Python 3.7. That should be changed in the very near future, as they are preparing the last batch of formula for the 3.8 transition, and after that, 3.8 will become the default.

1 Like

New version is in; ROOT 6.22.00 with fixed Python support. Run brew info python@3.8 to see the caveats; you should see something like /usr/local/opt/python@3.8/bin/python3 as the install location - you’ll need to use this Python with ROOT. Once the final Python 3.8 migration patch goes in (I think it’s waiting on a fix in brew itself to ease the transition), that caveat will go away and python3 Other than that, ROOT should now work correctly without scripts, even for Python.

1 Like

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