I have a problem when trying to use both ROOT and TensorFlow in Python scripts. When I install ROOT by itself, it seems to work fine, and I can do import root
in the Python interpreter. Similarly, when I install Tensorflow by itself, I can do import tensorflow
and run tensorflow’s test scripts with no issue. However, when I try to setup root and also tensorflow at the same time, I get confusing errors.
More specifically, here are the steps to reproduce and the resulting errors:
ssh elehrer@cmslpc-sl6.fnal.gov
source /cvmfs/cms.cern.ch/cmsset_default.sh
cd nobackup/CMSSW_9_4_0/src
cmsenv
source /cvmfs/sft.cern.ch/lcg/views/LCG_89/x86_64-slc6-gcc62-opt/setup.sh
source activate tensorflow
gives the error
Traceback (most recent call last):
File "/uscms/home/elehrer/miniconda2/bin/conda", line 7, in <module>
from conda.cli import main
ImportError: No module named conda.cli
which does not occur if I simply source activate tensorflow
without having run setup.sh first.
Alternatively, if I first activate my tensorflow environment then run setup.sh, i.e. I do
ssh elehrer@cmslpc-sl6.fnal.gov
source activate tensorflow
source /cvmfs/cms.cern.ch/cmsset_default.sh
cd nobackup/CMSSW_9_4_0/src
cmsenv
source /cvmfs/sft.cern.ch/lcg/views/LCG_89/x86_64-slc6-gcc62-opt/setup.sh
python -c "import tensorflow as tf"
then Python outputs “Illegal instruction” and exits, not allowing me to use TensorFlow.
Alternatively, if I do as the last line python -c "import root"
then I get
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named root
even though root is set up.
Any and all help would be greatly appreciated! I have no idea what is causing this issue, much less how to fix it.
ROOT Version: 6.10/02, Built for linuxx8664gcc
Platform: Linux cmslpc36.fnal.gov 2.6.32-696.23.1.el6.x86_64 #1 SMP Tue Mar 13 17:46:31 CDT 2018 x86_64 x86_64 x86_64 GNU/Linux
Compiler: gcc (GCC) 6.2.0