I am using a Mac 10.13.4
I have a file .ROOT which is export from Geant4.
I have installed root by cmake and python, however, I can not import ROOT from python
In : import ROOT
ImportError Traceback (most recent call last)
<ipython-input-1-b332e25ada1f> in <module>()
----> 1 import ROOT
ImportError: No module named ROOT
Could anybody please help me?
Thank you in advance.
ROOT Version (e.g. 6.13/03): Built for macosx64
Is the directory where you have
libPyROOT.so in your
PYTHONPATH? If not, your Python won’t be able to find it.
Thank you very much to figure out the problem Amadio,
I am a newbie in bash_profile ( I am using Mac). Could you please help me to link them together.
I have that file here: /Users/hoang/root/build/lib/libPyROOT.so
I have installed my python in: /Users/hoang/Library/Python/2.7/lib/python/site-packages
thank you in advance.
~/.bash_profile setup. That should do. Cheers,
Thank you again for your help amadio,
this is my .bash_profile:
#alias sshcc=‘ssh -Y email@example.com’
AND This is python places:
This still doesn’t work (import ROOT), should I reinstall python 2.7?
The place for ROOT should probably come last in your list, otherwise ROOT may try to import modules that will not be found. Please post the errors you get too, otherwise it’s hard to guess what’s happening. Thank you.
Thank amadio again,
It works now with the python inside a root TPython::Prompt().
In Ipython or python independently it has error when I try to import ROOT( import cppyy).
Anyway thank you very much, I can work with ROOT file now and I would like to close this topic to move to another topic.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.