jpata / tthbb13

2 stars 5 forks source link

MulticlassAnalyzer crash: pandas in cvmfs #110

Closed jpata closed 8 years ago

jpata commented 8 years ago

On a clean env after cmsenv && source setenv_psi.sh, upon running MEAnalysis_heppy.py via python tests.py I get

  File "/mnt/t3nfs01/data01/shome/jpata/tth/sw/CMSSW/python/TTH/MEAnalysis/MulticlassAnalyzer.py", line 7, in <module>
    import pandas
  File "/cvmfs/cms.cern.ch/slc6_amd64_gcc530/lcg/root/6.06.00-ikhhed4/lib/ROOT.py", line 303, in _importhook
    return _orig_ihook( name, *args, **kwds )
  File "/cvmfs/cms.cern.ch/slc6_amd64_gcc530/external/py2-pandas/0.17.1-giojec/lib/python2.7/site-packages/pandas-0.17.1-py2.7-linux-x86_64.egg/pandas/__init__.py", line 13, in <module>

We need to pop the cvmfs pandas from the sys.path and put the function in some central place for importing, there are currently two copies: fixPath and fixPythonPath https://github.com/jpata/tthbb13/commit/b38d5ae599d404e317356d9e9b8ab164d7bdcc14

jpata commented 8 years ago

if I pop the cvmfs pandas, of course crab jobs fail...

== CMSSW:     from TTH.MEAnalysis.MulticlassAnalyzer import MulticlassAnalyzer
== CMSSW:   File "/cvmfs/cms.cern.ch/slc6_amd64_gcc530/lcg/root/6.06.00-ikhhed4/lib/ROOT.py", line 303, in _importhook
== CMSSW:     return _orig_ihook( name, *args, **kwds )
== CMSSW:   File "/var/torque/tmpdir/1253592.sbgce1.in2p3.fr/glide_lnuKMQ/execute/dir_26505/CMSSW_8_0_11/python/TTH/MEAnalysis/MulticlassAnalyzer.py", line 9, in <module>
== CMSSW:     import pandas
== CMSSW:   File "/cvmfs/cms.cern.ch/slc6_amd64_gcc530/lcg/root/6.06.00-ikhhed4/lib/ROOT.py", line 303, in _importhook
== CMSSW:     return _orig_ihook( name, *args, **kwds )
== CMSSW: ImportError: No module named pandas

So either we pop it and it fails on the grid, or we don't pop it and it fails locally in the anaconda setup.

jpata commented 8 years ago

fixed by changin setenv_psi.sh, commit https://github.com/jpata/tthbb13/pull/115/commits/bf3da5a8b31945e70e2be9309affc351097d1d06