# \[LXPLUS\] root numpy not supported for ROOT 6.18/00

**URL:** <https://root-forum.cern.ch/t/lxplus-root-numpy-not-supported-for-root-6-18-00/35585>\
**Category:** Newbie\
**Created:** [August 9, 2019, 7:57pm UTC](https://root-forum.cern.ch/t/lxplus-root-numpy-not-supported-for-root-6-18-00/35585 "2019-08-09T19:57:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rishabhCMS](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/rishabhcms/32/19562_2.png) [@rishabhCMS](https://root-forum.cern.ch/u/rishabhCMS)\
**Post date:** [August 9, 2019, 7:57pm UTC](https://root-forum.cern.ch/t/lxplus-root-numpy-not-supported-for-root-6-18-00/35585/1 "2019-08-09T19:57:14Z")

</div>

Hi all,

I am trying to run a code which converts root files to numpy arrays on my /afs space on lxplus,  
the code was running perfectly until recently I started getting error regarding that the current “root numpy” version installed for ROOT 6.16/00.  
Is there a way to overcome this since I have very limited to no rights when it comes to modifying/updating software on lxplus.

```auto
 python2.7 tree_to_np.py /eos/cms/store/group/comm_dqm/ML4DC_2019/ML4DC_AODNtuples_2018 -d=/afs/cern.ch/work/r/runiyal/public/

```

the output to this is

> Error in TCling::RegisterModule: cannot find dictionary module libPyROOT\_rdict.pcm  
> /afs/cern.ch/user/r/runiyal/.local/lib/python2.7/site-packages/root\_numpy/ **init**.py:34: RuntimeWarning: ROOT 6.18/00 is currently active but you installed root\_numpy against ROOT 6.16/00. Please consider reinstalling root\_numpy for this ROOT version.  
> RuntimeWarning)  
> Traceback (most recent call last):  
> File “tree\_to\_np.py”, line 3, in   
> import root\_numpy  
> File “/usr/lib64/python2.7/site-packages/ROOT.py”, line 531, in \_importhook  
> return \_orig\_ihook( name, \*args, \*\*kwds )  
> File “/afs/cern.ch/user/r/runiyal/.local/lib/python2.7/site-packages/root\_numpy/ **init**.py”, line 51, in   
> from .\_tree import (  
> File “/usr/lib64/python2.7/site-packages/ROOT.py”, line 531, in \_importhook  
> return \_orig\_ihook( name, \*args, \*\*kwds )  
> File “/afs/cern.ch/user/r/runiyal/.local/lib/python2.7/site-packages/root\_numpy/\_tree.py”, line 6, in   
> from . import \_librootnumpy  
> File “/usr/lib64/python2.7/site-packages/ROOT.py”, line 531, in \_importhook  
> return \_orig\_ihook( name, \*args, \*\*kwds )  
> ImportError: libCore.so.6.16: cannot open shared object file: No such file or directory

Thanks in advance!  
Rishabh

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [August 9, 2019, 8:49pm UTC](https://root-forum.cern.ch/t/lxplus-root-numpy-not-supported-for-root-6-18-00/35585/2 "2019-08-09T20:49:53Z")

</div>

Maybe @etejedor could help with this issue…

---

<div class="post-metadata">

**Author:** ![sbinet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/sbinet/32/13166_2.png) [@sbinet](https://root-forum.cern.ch/u/sbinet)\
**Post date:** [August 9, 2019, 8:56pm UTC](https://root-forum.cern.ch/t/lxplus-root-numpy-not-supported-for-root-6-18-00/35585/3 "2019-08-09T20:56:30Z")

</div>

you probably need to recompile `root_numpy` against the new ROOT version that is active on lxplus.  
(or activate a ROOT version from CMS sw stack that is compatible w/ your `root_numpy` version)

alternatively, you could use [root2npy](https://godoc.org/go-hep.org/x/hep/cmd/root2npy) or a combination of [uproot](https://github.com/scikit-hep/uproot)+numpy.

---

<div class="post-metadata">

**Author:** ![etejedor](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/e79b87/32.png) [@etejedor](https://root-forum.cern.ch/u/etejedor)\
**Post date:** [August 12, 2019, 7:40am UTC](https://root-forum.cern.ch/t/lxplus-root-numpy-not-supported-for-root-6-18-00/35585/4 "2019-08-12T07:40:41Z")

</div>

Hi Rishabh,

To go from ROOT files (TTrees) to numpy arrays you can also use a couple of features implemented by ROOT itself:

- TTree -\> Numpy: `AsMatrix`  
[https://root.cern.ch/doc/master/pyroot002\_\_TTreeAsMatrix\_8py.html](https://root.cern.ch/doc/master/pyroot002__TTreeAsMatrix_8py.html)
- RDataFrame -\> Numpy : `AsNumpy`  
[https://root.cern.ch/doc/master/df026\_\_AsNumpyArrays\_8py.html](https://root.cern.ch/doc/master/df026__AsNumpyArrays_8py.html)

Please let us know if we can assist you with using those functions.  
Cheers,  
Enric

---

<div class="post-metadata">

**Author:** ![amadio](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/amadio/32/12562_2.png) [@amadio](https://root-forum.cern.ch/u/amadio)\
**Post date:** [August 13, 2019, 10:03am UTC](https://root-forum.cern.ch/t/lxplus-root-numpy-not-supported-for-root-6-18-00/35585/5 "2019-08-13T10:03:06Z")

</div>

> [@rishabhCMS](#):
>
> Error in TCling::RegisterModule: cannot find dictionary module libPyROOT\_rdict.pcm

This is the real problem. The [bug](https://bugzilla.redhat.com/show_bug.cgi?id=1734273) has already been fixed in Fedora, but still has not been pushed to EPEL. When that happens, then PyROOT will start working again on lxplus. You will also need to recompile against ROOT 6.18, as mentioned above, though. Cheers,

---

<div class="post-metadata">

**Author:** ![rishabhCMS](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/rishabhcms/32/19562_2.png) [@rishabhCMS](https://root-forum.cern.ch/u/rishabhCMS)\
**Post date:** [August 13, 2019, 1:53pm UTC](https://root-forum.cern.ch/t/lxplus-root-numpy-not-supported-for-root-6-18-00/35585/6 "2019-08-13T13:53:00Z")

</div>

Thank you so much guys!  
This was indeed helpful!  
How ever I solution which seemed most feasible to me for now was to source ROOT 16, but this is very temporary solution.

Really appreciate your time guys!
