Install root_numpy failing

Hello All,

I have an anaconda environment where I want to install root_numpy.

To do so I do:

pip install root_numpy

And I get:

======================================================================
Collecting root_numpy
Using cached https://files.pythonhosted.org/packages/d5/5f/82f5111c22599676eb8b5f9b1bf85c38dcc7995d52cd6b4a8f5f5caa4659/root_numpy-4.8.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-install-HWhk7r/root-numpy/setup.py”, line 69, in
"root-config is not in PATH and ROOTSYS is not set. "
RuntimeError: root-config is not in PATH and ROOTSYS is not set. Is ROOT installed correctly?

----------------------------------------

Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-install-HWhk7r/root-numpy/

======================================================================

The machine I do this is one of the GRID of my university. Root is installed there, and I can use it doing:

lsetup root

However, If I do that, I can no longer use “pip install …”

My question is, how do I setup the machino so I can use both my anaconda features but also root_numpy?

Thanks!

Dear @sergioGF

root_numpy is an external package and therefore it is not supported by ROOT, so unfortunately we cannot be of much help here.

Enric

Hi Sergio,

what is the functionality you are after? ROOT already provides quite some interoperability with NumPy and you may not need root_numpy…

Cheers,
D

Hi,

I actually only need the function root2array inside root_numpy.

Best,
Sergio

Hi @sergioGF

Please note that you have the equivalent functionality in ROOT already, with TTree.AsMatrix:

https://root.cern.ch/doc/master/pyroot002__TTreeAsMatrix_8py.html

Cheers,
Enric

Hi @etejedor

Well, that looks exactly like what I needed!

Thanks a lot!
Sergio

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