I am trying to get a TMVAGui running in ipython and I am struggling to do so even after some searching. I’m running the ipython version that comes with lxplus, i.e. version 0.13.2 and it uses python 2.6.6.
I found instructions to do the following, since I also cannot run it with the ROOT version that comes with CMSSW:
thanks, that makes it work if I run in python! Running that in ipython still doesn’t work because it loads the wrong python version. I’ll probably install my own version of ipython, if I manage.
I tested TMVA on ROOT 6.04 + ipython setup on an ubuntu machine and it works flawlessly
Setting up the environment a recent CMSSW (pre)release/IB, 8 series, could be the ideal for you.
In addition, even this is not really a ROOT issue but more a configuration one, I will come back to you if I find a solution for LXPLUS which is CMS agnostic and does not require additional installs.
thanks for your response. I think I agree that it’s a configuration issue rather than something more fundamental, however, regarding your comment 2) I tried it in a CMSSW_8_0_0_pre2 release and get the same issue.
So if I get my environment from CMSSW 8, I get ipython version 3.1.0, which is already much better than the 0.13.2 which is the default on lxplus.
which then load the right python version 2.7.9. However, if I then import ROOT I get some warnings from TInterpreter::ReadRootmapFile that some classes are already in libCore.so. But ok, ignoring those errors and running
seems to be working at first, i.e. it finds TMVAGui etc, then it flashes a GUI window open, but closes it immediately, not to be recovered.
Running it in a python prompt does the same, it does not keep the window open.
I’m a bit at loss, really.
Any idea would be appreciated.
-m
I’ll leave the issues of the CMS environment to CMS if you agree: I am sure that you’ll find all the support with the experts within the experiment.
Now, for what concerns the general solution on lxplus, this works:
source /afs/cern.ch/sw/lcg/releases/LCG_82/pytools/1.9_python2.7/x86_64-slc6-gcc49-opt/pytools-env.sh
source /afs/cern.ch/sw/lcg/releases/gcc/4.9.3/x86_64-slc6/setup.sh
/afs/cern.ch/sw/lcg/releases/ROOT/6.04.12-c016e/x86_64-slc6-gcc49-opt/bin/thisroot.sh
ipython
Python 2.7.10 (default, Nov 27 2015, 20:46:47)
Type "copyright", "credits" or "license" for more information.
IPython 3.1.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: import ROOT
In [2]: ROOT.TMVA.TMVAGui('TMVAoutput.root')
TUnixSystem::SetDisplay:0: RuntimeWarning: DISPLAY not set, setting it to pb-d-128-141-235-224.cern.ch:0.0
--- Launch TMVA GUI to view input file: TMVAoutput.root
Error in <TFile::TFile>: file TMVAoutput.root does not exist
==> Abort TMVAGui, please verify filename