Error in installing root numpy

Dear Experts,
I have installed root 6.10/04 successfully.
Then I installed root_numpy and started executing following codes:
from root_numpy import root2rec
import numpy as np
But I am still getting following errors:

Traceback (most recent call last):
File “”, line 1, in
from root_numpy import root2rec
File “/usr/local/lib/python2.7/dist-packages/root_numpy/”, line 21, in
ROOT_VERSION = root_version_active()
File “/usr/local/lib/python2.7/dist-packages/root_numpy/”, line 112, in root_version_active
import ROOT
ImportError: No module named ROOT

Somehow root is not linked with this packages.
Could you please suggest me how can I resolve this issue ?

I tried the command: root-config --has-python. it says: yes.



Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided

ROOT 6.10 is extremely old.
Try the latest stable ROOT release.

1 Like

…and in your shell run source /where/root/is/bin/ to make sure Python can find what it needs. Also make sure your ROOT build is for the Python version (2 or 3) that you want to use. And if things still don’t work the please let us know how you got your ROOT installed, exactly.

I have sourced it and added to my bashrc.
I tried root-config --has-python3/2. It says no.


How to make it python2/3 ?

Thanks for your reply.

So, what should I do now ?
starting from the beginning I mean from the root installation ?

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