There is no pyroot

root --version
ROOT Version: 6.30/02
Built for linuxx8664gcc on Dec 10 2023, 05:31:40
From heads/master@tags/v6-30-02

Platform: Ubuntu 20.04.6 LTS

g++ --version
g++ (Ubuntu 13.1.0-8ubuntu1~20.04.2) 13.1.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The problem is simple:

pyroot
pyroot: Command not found.

Also, there is no executable called “pyroot” or “pyroot.exe” in the directory in which root was installed:

root-6.30.02> find . -type f -iname “pyroot
./tutorials/pyroot/pyroot002_pythonizationDecorator.py
./tutorials/pyroot/pyroot001_arrayInterface.py
./tutorials/pyroot/pyroot005_tfile_context_manager.py
./tutorials/pyroot/pyroot004_NumbaDeclare.py
./tutorials/pyroot/pyroot006_tcontext_context_manager.py
./tutorials/pyroot/pyroot003_prettyPrinting.py
./include/ROOT/RDF/PyROOTHelpers.hxx
./lib/libJupyROOT3_8.so
./bindings/pyroot/pythonizations/CMakeFiles/ROOTPythonizations3_8.dir/src/PyROOTStrings.cxx.o
./bindings/pyroot/pythonizations/CMakeFiles/ROOTPythonizations3_8.dir/src/RPyROOTApplication.cxx.o
./bindings/pyroot/pythonizations/CMakeFiles/ROOTPythonizations3_8.dir/src/PyROOTModule.cxx.o
./bindings/pyroot/pythonizations/CMakeFiles/ROOTPythonizations3_8.dir/src/PyROOTWrapper.cxx.o

Any help would be appreciated!

Dear @mvpurohit ,

There is no pyroot executable in general. To use ROOT within a Python session, just run

$: python
>>> import ROOT

or directly import ROOT in any Python script.

Just to be sure, did you find the pyroot executable being mentioned anywhere, e.g. in tutorials or examples? In case, those would need to be rectified so let us know.

Cheers,
Vincenzo

Thank you. I am currently rebuilding ROOT thinking that the earlier build was in error. Will try “import ROOT” when it’s done.

[In an earlier version of my system “pyroot” used to work, but I don’t recall the earlier build from years ago so I can’t explain why it worked.]