Trouble with using PyROOT

I am trying to use PyROOT. so, after running “python” then “import ROOT” command I am getting an error saying:

"ImportError: Failed to import libcppyy3_11. Please check that ROOT has been built for Python 3.11"

I have installed all the required pacakges(required+most common optional) sucessfully.
Is there something else I am missing?
Thanks for any suggestion for solving this issue.


ROOT Version:6.30.2
Platform: ubuntu 22.04.3 LTS

Welcome to the ROOT forum

How have you installed ROOT ?

yes, I have installed root, the version is 6.30.2

you compiled it from the sources or you installed it from a precompiled distribution ?
What is the python version on your machine ?

I am very new to this stuffs. I will try to provide you a details picture of what I did.

The python version version on my machine is 3.11.5.

To install root I used pre-compiled binary distribution and I follwed this procedure:
→ Installed all required dependencies with the optionals also
→ downloaded the file the website (the version of root I am using - [Release 6.30/02 - 28 Nov 2023])

→ extracted the pacakage at “home” directory

then I ran the follwing commands:
→ cd root/bin
→ source

As, I had to excecute above two command everytime I wanted to use root, I ran:
→ echo “. ~/root/bin/” >> ~/.bashrc

What you are doing seems fine. As it seems to be a python issue let’s see if @vpadulan can help.

One more check: did you download the ROOT package specific to your OS (Ubuntu 22.04 as per your first post)?

Sorry, I did not understand your question. But, I will tell you what I did.

In the website(as a newbie, I can not share link!) where the packages are listed, first I chose the version(in my case root-6.30.2) , and then I choose ubuntu 22.04. If it is any helpful the package name is: “root_v6.30.02.Linux-ubuntu22.04-x86_64-gcc11.4.tar.gz”

I don’t know if you are asking for this.