# Python failing to recognize ROOT package despite successful installation and present within list of packages

**URL:** <https://root-forum.cern.ch/t/python-failing-to-recognize-root-package-despite-successful-installation-and-present-within-list-of-packages/62274>\
**Category:** Newbie\
**Tags:** python, root\
**Created:** [November 20, 2024, 1:07am UTC](https://root-forum.cern.ch/t/python-failing-to-recognize-root-package-despite-successful-installation-and-present-within-list-of-packages/62274 "2024-11-20T01:07:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aidan\_Ireland](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/aidan_ireland/32/37980_2.png) [@Aidan\_Ireland](https://root-forum.cern.ch/u/Aidan_Ireland)\
**Post date:** [November 20, 2024, 1:07am UTC](https://root-forum.cern.ch/t/python-failing-to-recognize-root-package-despite-successful-installation-and-present-within-list-of-packages/62274/1 "2024-11-20T01:07:01Z")

</div>

Hello, I am having issues when I attempt `Import ROOT` into a Jupyter Notebook. To preface, I am using Ubuntu on a windows computer. I have successfully followed the instructions for installing root within ubuntu using snap and have also installed root within my conda environment. My root version installed in ubuntu is 6.30/08 while that within my conda list is 6.26.4. In addition when not within a Jupyter Notebook, I can run

```auto
python
Import ROOT

```

without any problems. Once I open a Jupyter Notebook, I get the error that `ModuleNotFoundError: No module named 'ROOT'`. Furthermore, I can run the command `root --notebook` , and this creates a notebook in which I can import ROOT, however it does not import the python 3.7.12 kernal that I need which leads to extreme computation times. Is there a fix to either the kernal or import ROOT issue as a solution to either would allow me to use ROOT without issue.

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [November 20, 2024, 7:02am UTC](https://root-forum.cern.ch/t/python-failing-to-recognize-root-package-despite-successful-installation-and-present-within-list-of-packages/62274/2 "2024-11-20T07:02:25Z")

</div>

Hi Aidan,

Welcome to the ROOT Community!

The behaviours you describe seem to point to problems in your setup. What could start helping the debugging is to understand what version of ROOT and Python is used in which case.

Best,  
Danilo

---

<div class="post-metadata">

**Author:** ![Aidan\_Ireland](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/aidan_ireland/32/37980_2.png) [@Aidan\_Ireland](https://root-forum.cern.ch/u/Aidan_Ireland)\
**Post date:** [November 20, 2024, 7:37am UTC](https://root-forum.cern.ch/t/python-failing-to-recognize-root-package-despite-successful-installation-and-present-within-list-of-packages/62274/3 "2024-11-20T07:37:00Z")

</div>

Within a jupyter notebook which I run in my pythonROOT environment, the following are my python and root version:

```auto
python 3.7.12 hb7a2778_100_cpython conda-forge
root 6.26.4 py37hfb7772e_3 conda-forge

```

. Attempting to import ROOT fails in this instance.

Inside the `root --notebook`, `import ROOT` fails within this environment. When I change to a different environment where root is not installed and run `root --notebook` then the import is recognized. However, it says that my system version is `3.10.12` which will not work for my purposes, but I am confused because when I list my packages I have `3.7.12` listed in this particular environment. It also does not recognize the 3.7.12 kernal I attempted to import in jupyter notebook.
