# Jupyter kernel dies while importing ROOT

**URL:** <https://root-forum.cern.ch/t/jupyter-kernel-dies-while-importing-root/52371>\
**Category:** ROOT\
**Tags:** python, root, jupyter\
**Created:** [November 15, 2022, 10:24am UTC](https://root-forum.cern.ch/t/jupyter-kernel-dies-while-importing-root/52371 "2022-11-15T10:24:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![clowis](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/clowis/32/31515_2.png) [@clowis](https://root-forum.cern.ch/u/clowis)\
**Post date:** [November 15, 2022, 10:25am UTC](https://root-forum.cern.ch/t/jupyter-kernel-dies-while-importing-root/52371/1 "2022-11-15T10:25:00Z")

</div>

Hello Everyone,

I want to use ROOT with Python via Jupyter Notebook/Lab.  
When I try to import ROOT via Jupyter Notebook or Console, it results in a dead kernel.  
When I try to import ROOT directly in Python it works perfectly.  
The Python version is 3.9.13 in all cases (ROOT was also compiled using this version).

The Problem seems very similar to issue [JIRA/ROOT/ROOT-10884](https://sft.its.cern.ch/jira/browse/ROOT-10884), but this issue should be fixed in the version I am using (I also checked the CMakeLists.txt file from jupyroot)

I am very thankfull if you have any suggestions  
Chears,  
Carsten

* * *

_ROOT Version:_ 6.26.06  
_Platform:_ POP-OS 22.04 (Ubuntu 22.04)  
_Compiler:_ Not Provided

* * *

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [November 15, 2022, 1:28pm UTC](https://root-forum.cern.ch/t/jupyter-kernel-dies-while-importing-root/52371/2 "2022-11-15T13:28:59Z")

</div>

Welcome to the ROOT Forum!  
The issue you’re mentioning refers to a conda build. Is it also your case? And I’m not sure who can help with this. Maybe @etejedor ?

---

<div class="post-metadata">

**Author:** ![clowis](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/clowis/32/31515_2.png) [@clowis](https://root-forum.cern.ch/u/clowis)\
**Post date:** [November 15, 2022, 1:53pm UTC](https://root-forum.cern.ch/t/jupyter-kernel-dies-while-importing-root/52371/3 "2022-11-15T13:53:50Z")

</div>

I installed python and jupyter with conda. Root was compiled with the source files.

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [November 15, 2022, 1:55pm UTC](https://root-forum.cern.ch/t/jupyter-kernel-dies-while-importing-root/52371/4 "2022-11-15T13:55:07Z")

</div>

OK, thanks. Let’s hope @etejedor can help here…

---

<div class="post-metadata">

**Author:** ![clowis](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/clowis/32/31515_2.png) [@clowis](https://root-forum.cern.ch/u/clowis)\
**Post date:** [November 22, 2022, 2:03pm UTC](https://root-forum.cern.ch/t/jupyter-kernel-dies-while-importing-root/52371/5 "2022-11-22T14:03:46Z")

</div>

Short update:  
Deleted Root and Anaconda  
Reinstalled Anaconda  
Did this  
conda create -c conda-forge --name root\_env root python=3.9  
conda activate root\_env  
conda install -c anaconda ipykernel  
python -m ipykernel install --user --name=root\_env

Now everything works as far as I can tell

---

<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:** [December 6, 2022, 2:04pm UTC](https://root-forum.cern.ch/t/jupyter-kernel-dies-while-importing-root/52371/6 "2022-12-06T14:04:19Z")

</div>

Closed on December 6, 2022, 2:04pm UTC

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