How to install — Uproot documentation (original) (raw)

Uproot

PyPI version Conda-Forge Python 3.7‒3.11 BSD-3 Clause License Continuous integration tests

Scikit-HEP NSF-1836650 DOI 10.5281/zenodo.4340632 Documentation Gitter

Uproot is a library for reading and writing ROOT files in pure Python and NumPy.

Unlike the standard C++ ROOT implementation, Uproot is only an I/O library, primarily intended to stream data into machine learning libraries in Python. Unlike PyROOT and root_numpy, Uproot does not depend on C++ ROOT. Instead, it uses Numpy to cast blocks of data from the ROOT file as Numpy arrays.

Uproot can be installed from PyPI using pip. Awkward Array is optional but highly recommended:

pip install uproot awkward

Uproot is also available using conda (in this case, Awkward Array is automatically installed):

conda install -c conda-forge uproot

If you have already added conda-forge as a channel, the -c conda-forge is unnecessary. Adding the channel is recommended because it ensures that all of your packages use compatible versions (see conda-forge docs):

conda config --add channels conda-forge conda update --all

Documentation

ROOT is a C++ toolkit for data analysis, part of which is the ROOT file format. Over an exabyte of particle physics data are stored in ROOT files around the world.

Uproot is a Python implementation of ROOT I/O, independent of the ROOT toolkit itself (including ROOT’s Python interface, PyROOT).

Getting help