Hi,
I have been trying to install PyRoot on Windows 11 with python 3.8 (Anaconda distribution).
I installed Root using .exe file from the original page (i am not allowed to imsert links), Release 6.24/06 - 2021-09-03, then added the bin folder to the Spyder path, but when i try to import ROOT, I get:
ImportError: Failed to import libcppyy3_8. Please check that ROOT has been built for Python 3.8
The full output is the following:
import ROOT
Traceback (most recent call last):
File "C:\Users\User\ROOT\bin\cppyy\__init__.py", line 60, in <module>
importlib.import_module(libcppyy_mod_name)
File "C:\Users\User\anaconda3\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'libcppyy3_8'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<ipython-input-1-ee8dc4376aa8>", line 1, in <module>
import ROOT
File "C:\Users\User\ROOT\bin\ROOT\__init__.py", line 22, in <module>
import cppyy
File "C:\Users\User\ROOT\bin\cppyy\__init__.py", line 62, in <module>
raise ImportError(
ImportError: Failed to import libcppyy3_8. Please check that ROOT has been built for Python 3.8
I have found some solutions for similar problems, but none of them worked (mostly because they were not fit for Windows).
Any idea how to solve this?
Many thanks in advance.
Specificaly when I run only Python (with no interpreter, just Python in cmd), the pyROOT works! Well, yes, the canvas does not respond and I am forced to shut python down, but it is working!