Issues installing ROOT with Python support

ROOT Version: 6.24/06 and 6.28/0
Platform: Ubuntu 20.04

I was trying to install ROOT with Python support. I already have one installation that works fine.
First I tried to rebuild the same version (v6.24/06) with Python3. That compiled fine without any error but when I was trying to import ROOT from Python it gives an error.


The commands I used for the installation are as follows

cmake -DPYTHON_EXECUTABLE=/usr/bin/python3 ../root_src
sudo cmake --build . --target install -- -j5

I tried both the Python, the one at /usr/bin and the one in the conda environment. Both gave the same error.

Then I tried the conda installation to keep things simple. It also got installed without any error. The commands I used are the following:

conda deactivate
conda config --set channel_priority strict
conda create -c conda-forge --name icts_root root

But again when I tried to run the ROOT by the command root or through Python importing root via import ROOT, I got the following error.

Could you help me install it successfully so that I am able to use pyROOT using a Jupyter notebook.

I thank you for any possible help in this regard.

With regards,

Maybe @vpadulan or @eguiraud can help with this

Thank you so much @bellenot for your response and referral.

@vpadulan and @eguiraud, would you be able to kindly guide me to successfully install the ROOT with Python3 support? That would be really helpful for me. Let me know if I need to provide any additional info.

Thanks a lot.

With regards,

Hello @Saumyenk ,

in the first screenshot it looks like ROOT is simply not available in the environment. Maybe you didn’t run source /path/to/root/bin/ before starting the python interpreter?

You probably don’t have to build ROOT from source, see if there is a package that works for you at Installing ROOT - ROOT . If not, please review the instructions at Building ROOT from source - ROOT carefully.

About the second error, with the conda environment, it looks like you have a ROOT installation at system level that is interfering with the ROOT installation in the conda environment (note how the error messages refer to /usr/local/lib/ while from the conda environment you should be picking up the ROOT that resides in the conda prefix).
Removing the system installation should fix this.


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