I looked on the ROOT site about what PyRoot was, and I am still a little bit confused. How is PyRoot different from Root? If I downloaded a binary for Root, do I only need to import it to the python environment I use, then it should be working?
yes: you just need to “import ROOT” to access the entire set of classes of ROOT (and yours, too!) from Python.
Since you have also additional questions, I propose you visit our “Getting Started” section: root.cern.ch/getting-started
I tried that with some sample code and the shell says there is no module named root. Should I try saving the distribution of Root I have somewhere else?
I ran the script in Terminal, and the path is now @libdir@. However I still get the same import error, claiming there is no module named ROOT. Also when I quit out of Terminal and restart it, it says the pythonpath variable is not set to anything.
Also, maybe I am trying to import it incorrectly. This is the script I am trying to run: from ROOT import gROOT, TCanvas, TF1.
What do you mean by @libdir@? A full path? If yes, is it the correct one, i.e. the one containing all root li raries and the ROOT module, i.e. the ROOT.py file?
The setup of the environment is of course not correctly set once opening a other terminal.
PYTHONPATH needs to be set for the ROOT module to be inportable.