# Can't import 'TFile' in pyROOT

**URL:** <https://root-forum.cern.ch/t/cant-import-tfile-in-pyroot/57031>\
**Category:** Newbie\
**Tags:** python, jupyter\
**Created:** [November 8, 2023, 1:35pm UTC](https://root-forum.cern.ch/t/cant-import-tfile-in-pyroot/57031 "2023-11-08T13:35:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![krish](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/krish/32/34978_2.png) [@krish](https://root-forum.cern.ch/u/krish)\
**Post date:** [November 8, 2023, 1:35pm UTC](https://root-forum.cern.ch/t/cant-import-tfile-in-pyroot/57031/1 "2023-11-08T13:35:40Z")

</div>

I am trying to use pyROOT in jupyter. I was able to import ROOT without any error, but I am not able to import other modules from ROOT. For an example:`from ROOT import TFile` gives me the following error

> ImportError: cannot import name ‘TFile’ from ‘ROOT’ (unknown location)

_ROOT Version:_ ROOT 6.28/06  
_Platform:_ Ubuntu  
\_Compiler:\_pyROOT

* * *

---

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [November 14, 2023, 3:47pm UTC](https://root-forum.cern.ch/t/cant-import-tfile-in-pyroot/57031/2 "2023-11-14T15:47:12Z")

</div>

This is strange, probably your ROOT installation has some issues. How did you install ROOT ?

---

<div class="post-metadata">

**Author:** ![krish](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/krish/32/34978_2.png) [@krish](https://root-forum.cern.ch/u/krish)\
**Post date:** [November 15, 2023, 5:09pm UTC](https://root-forum.cern.ch/t/cant-import-tfile-in-pyroot/57031/3 "2023-11-15T17:09:43Z")

</div>

Hi, I have installed root from the source (build and make)

---

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [November 17, 2023, 10:17am UTC](https://root-forum.cern.ch/t/cant-import-tfile-in-pyroot/57031/4 "2023-11-17T10:17:46Z")

</div>

Check if uproot works in the simple python environment and also that you don’t have other versions of ROOT installed in your system that accidentally get used when using Jupyter

Lorenzo
