Hi,
I am new to pyroot, in fact I just installed it and I am trying to run an extremely simple script to check if the things I need for my other program are successfully imported. Seems like no. Here is the simple code:
#!/usr/bin/python
import math
import sys
import numpy as np
from scipy import linspace, polyval, polyfit, sqrt, stats, randn
from ROOT import gROOT, TCanvas,TH1D,TH2D,TFile,TStyle,TLegend,TPave,TPaveStats,TPad,TPaveLabel,gStyle,gPad,TPaletteAxis,TLine
print "Yes!"
and when I try to run this file with the command: python test.py
And I get this:
Traceback (most recent call last): File “test.py”, line 6, in from ROOT import gROOT, TCanvas,TH1D,TH2D,TFile,TStyle,TLegend,TPave,TPaveStats,TPad,TPaveLabel,gStyle,gPad,TPaletteAxis,TLine ImportError: No module named ROOT_
I checked some related topics on the forum but there are many recommendations and I don’t know where to start from. Any advice is more than welcome! Btw I am using Mac OS X 10.7.5, ROOT 5.34/34 and Python 2.7.1. Merci!