Dear Enric
I reinstalled ipython notebook following your guidelines but I get the same error when opening a new “ROOT prompt file”:
[I 09:38:03.768 NotebookApp] Kernel started: d6c646d9-9a1f-4a8a-9aec-e80b5520bdbe
[IPKernelApp] WARNING | Error in executing line in user namespace: import ROOT;ROOT.toCpp();
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/IPython/core/ultratb.py", line 970, in get_records
return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
File "/usr/lib/python2.7/site-packages/IPython/core/ultratb.py", line 233, in wrapped
return f(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/IPython/core/ultratb.py", line 267, in _fixed_getinnerframes
records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
File "/usr/lib64/python2.7/inspect.py", line 1043, in getinnerframes
framelist.append((tb.tb_frame,) + getframeinfo(tb, context))
File "/usr/lib64/python2.7/inspect.py", line 1003, in getframeinfo
filename = getsourcefile(frame) or getfile(frame)
File "/usr/lib64/python2.7/inspect.py", line 444, in getsourcefile
filename = getfile(object)
File "/usr/lib64/python2.7/inspect.py", line 409, in getfile
if ismethod(object):
File "/opt/CERN/ROOT6/root-6.05.03/lib/ROOT.py", line 117, in ismethod
if type(object) == _root.MethodProxy:
AttributeError: 'NoneType' object has no attribute 'MethodProxy'
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/IPython/core/ultratb.py", line 970, in get_records
return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
File "/usr/lib/python2.7/site-packages/IPython/core/ultratb.py", line 233, in wrapped
return f(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/IPython/core/ultratb.py", line 267, in _fixed_getinnerframes
records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
File "/usr/lib64/python2.7/inspect.py", line 1043, in getinnerframes
framelist.append((tb.tb_frame,) + getframeinfo(tb, context))
File "/usr/lib64/python2.7/inspect.py", line 1003, in getframeinfo
filename = getsourcefile(frame) or getfile(frame)
File "/usr/lib64/python2.7/inspect.py", line 444, in getsourcefile
filename = getfile(object)
File "/usr/lib64/python2.7/inspect.py", line 409, in getfile
if ismethod(object):
File "/opt/CERN/ROOT6/root-6.05.03/lib/ROOT.py", line 117, in ismethod
if type(object) == _root.MethodProxy:
AttributeError: 'NoneType' object has no attribute 'MethodProxy'
I tried again also the other suggestion: I opened a “Python2” notebook and I get the same error as soon as I try “import ROOT”. I guess if the issue is that it cannot correctly find the root installation (even if the third-to-last line above shows the right installation path). Please take into account that I am using the CERN Centos 7.1 operating system so I first run:
scl enable devtoolset-3 /bin/tcsh
source /opt/CERN/ROOT6/root-6.05.03/bin/thisroot.csh
before doing any other thing. I never tried to start pyROOT (am I supposed to have a “pyroot” command or similar available?)
Any suggestion is very welcome
Thanks,
Matteo