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/libpython3.5m.so.1.0 ../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/ROOT.py in <module>()
    614    ip = get_ipython()
    615    if hasattr(ip,"kernel"):
--> 616       import JupyROOT
    617       import JsMVA
    618 

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

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

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

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

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

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

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):

Hello,

I’ve just pushed a fix to ROOT master and 6.10 patches:

https://root.cern.ch/gitweb/?p=root.git;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.

Cheers,

Enric

Thanks, etejedor

Amazing!!!
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.