# Failed to import ROOT in jupyter notebook in docker fedora 36

**URL:** <https://root-forum.cern.ch/t/failed-to-import-root-in-jupyter-notebook-in-docker-fedora-36/51517>\
**Category:** ROOT\
**Tags:** jupyter\
**Created:** [September 9, 2022, 5:46pm UTC](https://root-forum.cern.ch/t/failed-to-import-root-in-jupyter-notebook-in-docker-fedora-36/51517 "2022-09-09T17:46:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jingliu](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/jingliu/32/11192_2.png) [@jingliu](https://root-forum.cern.ch/u/jingliu)\
**Post date:** [September 9, 2022, 5:46pm UTC](https://root-forum.cern.ch/t/failed-to-import-root-in-jupyter-notebook-in-docker-fedora-36/51517/1 "2022-09-09T17:46:38Z")

</div>

* * *

_ROOT Version:_ 6.26/06  
_Platform:_ Fedora 36 in docker  
_Compiler:_ g++

* * *

When I run `import ROOT` in a jupyter notebook started as `root --notebook --allow-root --no-browser --ip=0.0.0.0`, I got the following error message:

```auto
Error in callback <bound method CaptureDrawnPrimitives._post_execute of <JupyROOT.helpers.utils.CaptureDrawnPrimitives object at 0x7f6e28ecbc70>> (for post_execute):

IncrementalExecutor::executeFunction: symbol '_ZN4ROOT12Experimental7RCanvas11GetCanvasesEv' unresolved while linking symbol '__cf_18'!
You are probably missing the definition of ROOT::Experimental::RCanvas::GetCanvases()
Maybe you need to load the corresponding shared library?

---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
File /usr/lib64/python3.10/site-packages/JupyROOT/helpers/utils.py:461, in CaptureDrawnPrimitives._post_execute(self)
    460 def _post_execute(self):
--> 461 NotebookDraw()

File /usr/lib64/python3.10/site-packages/JupyROOT/helpers/utils.py:451, in NotebookDraw()
    449 DrawGeometry()
    450 DrawCanvases()
--> 451 DrawRCanvases()

File /usr/lib64/python3.10/site-packages/JupyROOT/helpers/utils.py:444, in DrawRCanvases()
    443 def DrawRCanvases():
--> 444 rdrawers = GetRCanvasDrawers()
    445 for drawer in rdrawers:
    446 drawer.Draw()

File /usr/lib64/python3.10/site-packages/JupyROOT/helpers/utils.py:416, in GetRCanvasDrawers()
    414 def GetRCanvasDrawers():
    415 if not RCanvasAvailable(): return []
--> 416 lOfC = ROOT.Experimental.RCanvas.GetCanvases()
    417 return [NotebookDrawer(can. __smartptr__ ().get()) for can in lOfC if can.IsShown()]

ValueError: static const vector<shared_ptr<ROOT::Experimental::RCanvas> > ROOT::Experimental::RCanvas::GetCanvases() =>
    ValueError: nullptr result where temporary expected

```

But if I run `import ROOT` in `ipython` in the same container, everything is fine.

I installed root using `dnf install root python3-jupyroot`. The output of `root-config --features` is

```nohighlight
cxx17 asimage builtin_clang builtin_cling builtin_llvm builtin_openui5
dataframe davix dcache exceptions fftw3 fitsio fortran gdml gfal gnuinstall
gsl_shared gviz http fcgi imt mathmore mlp minuit2 mysql odbc opengl pgsql
pyroot pythia8 qt5web rroofit webgui root7 shadowpw shared soversion sqlite
ssl tmva tmva-cpu tmva-sofie tmva-pymva tmva-rmva spectrum unuran uring x11
xml xrootd

```

Please let me know if you need more information to figure out what causes the problem.

Thanks, Jing

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [September 10, 2022, 2:26pm UTC](https://root-forum.cern.ch/t/failed-to-import-root-in-jupyter-notebook-in-docker-fedora-36/51517/2 "2022-09-10T14:26:39Z")

</div>

Hi @jingliu ,

it looks like there is a hook that is executed when starting ROOT in a notebook that tries to load and use ROOT7 graphics. The maintainers of the Fedora ROOT package split ROOT into several sub-packages, so my guess is that you don’t have a necessary ROOT sub-package install (the one that provides `ROOT::Experimental::RCanvas::GetCanvases()`).

Given the list here: [root - Fedora Packages](https://packages.fedoraproject.org/pkgs/root) my guess is that you need `root-graf-gpadv7 `. You could/should report to the maintainers of the Fedora packages that this dependency is missing.

Cheers,  
Enrico

---

<div class="post-metadata">

**Author:** ![jingliu](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/jingliu/32/11192_2.png) [@jingliu](https://root-forum.cern.ch/u/jingliu)\
**Post date:** [September 13, 2022, 1:38pm UTC](https://root-forum.cern.ch/t/failed-to-import-root-in-jupyter-notebook-in-docker-fedora-36/51517/3 "2022-09-13T13:38:09Z")

</div>

Hi, Enrico, you nailed it! Thank you! Jing

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [September 27, 2022, 1:38pm UTC](https://root-forum.cern.ch/t/failed-to-import-root-in-jupyter-notebook-in-docker-fedora-36/51517/4 "2022-09-27T13:38:26Z")

</div>

Closed on September 27, 2022, 1:38pm UTC

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