kdipetri / SUEP_Analysis

1 stars 4 forks source link

Python cannot import ROOT #3

Open chrispap95 opened 4 years ago

chrispap95 commented 4 years ago

When reaching the step that executes make_plots.py the following error arises:

[chpapage@cmslpc157 SUEP_Analysis]$ python util/make_plots.py 
Traceback (most recent call last):
  File "util/make_plots.py", line 1, in <module>
    import ROOT
  File "/cvmfs/cms.cern.ch/slc7_amd64_gcc530/lcg/root/6.08.07-njopjo/lib/ROOT.py", line 24, in <module>
    import cppyy
  File "/cvmfs/cms.cern.ch/slc7_amd64_gcc530/lcg/root/6.08.07-njopjo/lib/cppyy.py", line 60, in <module>
    import libPyROOT as _backend
ImportError: /cvmfs/cms.cern.ch/slc7_amd64_gcc530/lcg/root/6.08.07-njopjo/lib/libPyROOT.so: undefined symbol: _ZN5TROOT14RegisterModuleEPKcPS1_S2_S1_S1_PFvvERKSt6vectorISt4pairISsiESaIS7_EES2_
kdipetri commented 4 years ago

Hi Christos, in the setup.sh script if you chance this line source /cvmfs/cms.cern.ch/slc7_amd64_gcc530/lcg/root/6.08.07-njopjo/bin/thisroot.sh to this source /cvmfs/sft.cern.ch/lcg/views/LCG_97rc4/x86_64-centos7-gcc9-opt/setup.sh

you should be able to compile and do python util/make_plots.py

chrispap95 commented 4 years ago

Okay! I was using the cmssw branch where the setup file is different. I think it deserves a special setupROOT.sh script since it can interfere with compilation.