ROOT Version: 6.22.0
Platform: Mac 11.4
Sorry if I am not expressing myself in the correct jargon, but I am fairly new with these topics.
I have ROOT already running on my local machine, now I am working inside an Anaconda environment with Python 2.7. When setting up the environment I directly installed ROOT version 6.22 (compatible with Python 2.7) - it is also listed with
conda list root
However when wanting to import ROOT inside python, I am getting the following error message:
“Traceback (most recent call last):
File “”, line 1, in
File “/Users/FranzkeMM/root_v6.26.00/lib/ROOT/init.py”, line 22, in
File “/Users/FranzkeMM/root_v6.26.00/lib/cppyy/init.py”, line 64, in
libcppyy_mod_name, major, minor))
ImportError: Failed to import libcppyy2_7. Please check that ROOT has been built for Python 2.7”
so it seems, that python somehow looks for root on the version that is locally installed and not via Anaconda.
So my idea would have been to prevent this with sourcing like this:
But the message is being returned:
" ERROR: thisroot.sh, thisroot.csh and thisroot.fish should never be used
Look at using “conda activate ENVIRONMENT_NAME”
Any ideas on what is happening? Thanks a lot in advance!
P.S. when sourcing to the thisroot.sh file of the locally installed root, it is working, but this is in general not what I want of course