Dear experts,
I download a pre-compiled binary distribution ROOT6.28.04 and install it in Ubuntu 18.04.
Then I write the configuration file as follows:
# root6
export ROOTSYS="/mnt/work/soft/root6.28.04/"
export PATH="$PATH:$ROOTSYS/bin"
export PYTHONDIR=$ROOTSYS
export LD_LIBRARY_PATH=$ROOTSYS/lib:$PYTHONDIR/lib:$ROOTSYS/bindings/pyroot:$LD_LIBRARY_PATH
export PYTHONPATH=$ROOTSYS/lib:$PYTHONPATH:$ROOTSYS/bindings/pyroot
alias root="source /mnt/work/soft/root6.28.04/bin/thisroot.sh && root"
20 # >>> conda initialize >>>
__conda_setup="$('/mnt/public/shuangli/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/mnt/public/shuangli/anaconda3/etc/profile.d/conda.sh" ]; then
. "/mnt/public/shuangli/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/mnt/public/shuangli/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
conda deactivate
conda activate my_env
When I import the ROOT, an error is given:
import ROOT
File "/mnt/work/soft/root6.28.04/lib/ROOT/__init__.py", line 25, in <module>
import cppyy
File "/mnt/work/soft/root6.28.04/lib/cppyy/__init__.py", line 64, in <module>
libcppyy_mod_name, major, minor))
ImportError: Failed to import libcppyy3_7. Please check that ROOT has been built for Python 3.7
After checking, namely root-config --python-version
, the python version is 3.6.9, which is different from my python 3.7.16.
My question is why is the version of python inconsistent when I do this?
With best respect,
Boan