Trying to run root with conda python environment in notebook. Initial error:
conda activate tf
python
import ROOT
raceback (most recent call last):
File "/home/alpha/packages/root/root_install/lib/cppyy/__init__.py", line 60, in <module>
importlib.import_module(libcppyy_mod_name)
File "/home/alpha/anaconda3/envs/tf/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'libcppyy3_9'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/alpha/packages/root/root_install/lib/ROOT/__init__.py", line 25, in <module>
import cppyy
File "/home/alpha/packages/root/root_install/lib/cppyy/__init__.py", line 62, in <module>
raise ImportError(
ImportError: Failed to import libcppyy3_9. Please check that ROOT has been built for Python 3.9
however when I run:
(base) root-config --python3-version
3.9.19
it seems to say it was built with 3.9.
Though if I run that comand in my environment:
(tf) root-config --python3-version
bash: /home/alpha/anaconda3/envs/tf/lib/libtinfo.so.6: no version information available (required by bash)
3.9.19
i get that error before the print statement.
Here is how I compiled root, in base pointing to the conda env python:
cmake -DCMAKE_INSTALL_PREFIX=../root_install -DPYTHON_EXECUTABLE=/home/alpha/anaconda3/envs/tf/bin/python ../root_src
Any help appreciated, cheers.
PS: I have seen Python: No module named 'root', which is why I pointed at the exact python version I would like to use