Hi, ROOT experts,
I’ve recently updated both ROOT and Python3 on my MacBook through Homebrew. But now I can’t use ROOT in Python and I got this when I tried to import ROOT:
Traceback (most recent call last):
File "/opt/homebrew/Cellar/root/6.26.06_2/lib/root/cppyy/__init__.py", line 60, in <module>
importlib.import_module(libcppyy_mod_name)
File "/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
File "<frozen importlib._bootstrap>", line 1142, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'libcppyy3_11'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/homebrew/Cellar/root/6.26.06_2/lib/root/ROOT/__init__.py", line 22, in <module>
import cppyy
File "/opt/homebrew/Cellar/root/6.26.06_2/lib/root/cppyy/__init__.py", line 62, in <module>
raise ImportError(
ImportError: Failed to import libcppyy3_11. Please check that ROOT has been built for Python 3.11
ROOT Version: 6.26/06
Python Version: 3.11.2
Is there a good way to solve this problem?
Thank you!