Missing libPyROOT.so

Hi so I recently downloaded root 6.24.00 on Ubuntu 20 and I have been trying to use root in python. When I try to import root in python, I get the error “ModuleNotFoundError: No module named ‘libPyROOT’”. This happens when it is working through the cppyy.py file and tries to import libPyROOT. I think it’s not working because I don’t have the libPyROOT.so file downloaded on my computer but I’m not sure why it didn’t download when I installed root since I seem to have all of the other files that I need. Please let me know how I can get the libPyROOT.so file.

Please read tips for efficient and successful posting and posting code

ROOT Version: 6.24.00
Platform: Ubuntu 20
Compiler: Not Provided


libPyROOT does not exist anymore in ROOT 6.24, it looks like you are still using an older version of ROOT? Perhaps a problem in your environment?

You downloaded the Ubuntu 20 binaries for ROOT? How did you set your environment?

I built it from source then I tried downloading the binary distribution and had a similar problem for both of them. As shown in the picture below, it says “cannot open shared object file”. So at this point, I’m not sure what the problem is. Also I do have ROOT 6.24, I was mistaken about the libPyROOT.so file.

Also depending on what path I append, I can also get the “No module named ‘libPyROOT’” error.


The pyroot_legacy folder contains the old PyROOT (that is why you get the libPyROOT.so error).

I see that you have in ~/Products/root-6.24.00 the downloaded binary version of ROOT?

If so, please do, from the terminal, source ~/Products/root-6.24.00/bin/thisroot.sh, then from the same terminal run root --notebook. This should start Jupyter and you should be able to import ROOT in a cell of a Python notebook without problems.

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