Problem with jupyter notebook and python 3

Hello, I am a new ROOT user
and I have some question
I install ROOT 6 use python 3

cmake -Droofit=ON -Dfftw3=ON -Dpython3=ON -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.5m -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/ ../root  

and I can import ROOT and use ROOT in the terminal

and it works

But everything changes in the jupyter notebook

ValueError                                Traceback (most recent call last)
<ipython-input-1-ee8dc4376aa8> in <module>()
----> 1 import ROOT

~/Ben_root_build/lib/ in <module>()
    614    ip = get_ipython()
    615    if hasattr(ip,"kernel"):
--> 616       import JupyROOT
    617       import JsMVA

~/Ben_root_build/lib/ in _importhook(name, *args, **kwds)
    316       except Exception:
    317          pass
--> 318    return _orig_ihook( name, *args, **kwds )
    320 __builtin__.__import__ = _importhook

~/Ben_root_build/lib/JupyROOT/ in <module>()
      3 if '__IPYTHON__' in __builtins__ and __IPYTHON__:
      4     cppcompleter.load_ipython_extension(get_ipython())
----> 5     utils.iPythonize()

~/Ben_root_build/lib/JupyROOT/ in iPythonize()
    500 def iPythonize():
    501     setStyle()
--> 502     loadMagicsAndCapturers()
    503     declareProcessLineWrapper()
    504     #enableCppHighlighting()

~/Ben_root_build/lib/JupyROOT/ in loadMagicsAndCapturers()
    473     for extName in extNames:
    474         extMgr.load_extension(extName)
--> 475     captures.append(StreamCapture())
    476     captures.append(CaptureDrawnPrimitives())

~/Ben_root_build/lib/JupyROOT/ in __init__(self, ip)
    241         self.errString = ""
--> 243         self.asyncCapturer = handlers.Runner(self.syncCapture)
    245         self.isFirstPreExecute = True

~/Ben_root_build/lib/JupyROOT/ in __init__(self, function)
     97         self.function = function
     98         if platform != 'darwin':
---> 99             setrlimit(RLIMIT_STACK,(RLIM_INFINITY,RLIM_INFINITY))
    100         self.thread = None

ValueError: current limit exceeds maximum limit

I have no idea about how to deal with it?
Can you help me?

Maybe @dpiparo or @etejedor could help you

I just posted about this same error last week (python 2 though):


I’ve just pushed a fix to ROOT master and 6.10 patches:;a=commitdiff;h=67ba4b061ef51a9fe0a36c11483b1b9f86ff871c

In short, we are not setting the maximum stack size anymore since it demonstrated to be problematic.

Please let us know if this solves your issue.



Thanks, etejedor

It works!!!(I use ROOT 6.11/01)
Both Python3 and ROOT C++ work!!

BTW, I use ROOT in the Bash on Windows and Xming.

This is the exact same environment as used in my issue. This fix resolved the issue with python 2 as well.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.