Installing root for python via pip or conda?

Dear rooters,

Lately, I have discovered myself using root more and more often as a python package.
Python offers kind of the same functionality than the classic root interpreter, and permits to combine the ROOT libraries with the extensive collection of utilities made for python.

Using ROOT from python is so convenient sometimes that I wonder if one could install just a python version of ROOT.
I have seen other C++ written software packages providing python bindings, such as VTK: https://vtk.org, which can be quickly installed though pip or conda.
The installation for python through pip or conda is so quick and easy (and works flawless) that almost makes me cry.

It would be awesome if something similar could be done with root.
This feature would definitely brings ROOT closer to younger scientists, in particular, and to python users in general.

Greetings!

Hi,
ROOT recently made it to conda-forge.
Install with conda install -c conda-forge root

Edit: you can find more info here

Cheers,
Enrico

Oh great. I will try it immediately.
Cheers!

Just to add: The conda-forge package is not just for Python and is designed to be fully functional ROOT installation, including C++17 compatible compilers, for any macOS/Linux system.

There are no known limitations but if you do have problems you can open an issue here.

Meaning that I can also compile my C++ software based on ROOT using the conda-forge version? Cool!

I would like to comment that I couldn’t try this version of ROOT yet because is taking so long to be installed (more than one hour already!).

In the mean time I have checked this issue:

I also agree that it would be great to have a minimal root base package for basic functionality and then add the extra modules in case you need them.

Any idea if this is already possible or in progress?
It is not clear to me what is the status from what is written in the git repository.

Cheers.

It should take less than 5 minutes to install (I gave a 5 minute lightning talk about this at HOW 2019, and did a live demo of installing it during the talk). Any idea of what is taking so long? See my blog post here.

Right now, the problem with a minimal ROOT package is that the error message for missing parts will not be very good. The entire ROOT package is about 50 MB, but the dependencies are about 500MB. Most of the dependencies are only needed for a small part of ROOT. So that part would simply not work unless you also install the required dependency by hand; for example, compiling would not work unless you install the compilers package, but running + or ++ on a filename would probably give you an ugly warning that doesn’t include “conda install compilers” as a suggestion.

This might become better from the ROOT side soon(ish). From our side it shouldn’t be too hard to add the first part of this when one of us has some time.

Hello, I tried the installation in my laptop and took around 5 minutes. So I confirm what you said.
This way of installing ROOT is awesome, and with full functionality…
Thanks a lot for this!

When I reported that the installation was so long was partially my fault.
In reality the installation took longer but around 10 minutes and not one hour.
It was in a cluster machine. No idea what is causing this, but I experienced the same long delays when compiling older ROOT versions using cmake in the same cluster machine. Maybe is related.
Cheers.

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