No Module named ROOT

I am using MacOs Sierra with python 3.6. and while running the code it is is showing the following error :

Traceback (most recent call last):
  File "trial.py", line 1, in <module>
    from ROOT import TCanvas, TH1D, TFile
ModuleNotFoundError: No module named 'ROOT'

I have already tried to set the path of $PythonPath and now the .bash_profile looks something like this

#CERN ROOT
source /Users/koustavchandra/root-6.08.04/bin/thisroot.sh
#export ROOTSYS=/usr/local/root
#export PATH=$ROOTSYS/bin:$PATH
#export PYTHONDIR=$ROOTSYS
#export LD_LIBRARY_PATH=$ROOTSYS/lib:$PYTHONDIR/lib:$ROOTSYS/bindings/pyroot:$LD_LIBRARY_PATH
export PYTHONPATH=$ROOTSYS/lib:$PYTHONPATH:$ROOTSYS/bindings/pyroot

# added by Miniconda3 4.3.11 installer
export PATH="/Users/koustavchandra/miniconda3/bin:$PATH"

# added by Anaconda3 4.3.1 installer
export PATH="/Users/koustavchandra/anaconda/bin:$PATH"

So tell me what to do ?

Do you have /Users/koustavchandra/root-6.08.04/lib/libPyROOT.so?

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