Enable PyROOT and Install rootpy

Hi,
I have installed ROOT 5.34/30 some time ago.

Now I want to enable PyROOT and then install rootpy.

To install PyROOT I have to run
./configure [–with-python-incdir=][–with-python-libdir=>dir>]

according to https://root.cern.ch/root/htmldoc/guides/users-guide/ROOTUsersGuide.html#python-and-ruby-interfaces

So I have typed in the Ubuntu terminal
find / -name “libpython*.so*” -o -name “libpython*.dylib*”

and I obtained
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
/usr/lib/x86_64-linux-gnu/libpython2.7.so
/usr/lib/x86_64-linux-gnu/libpython3.5m.so.1
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1
/usr/lib/x86_64-linux-gnu/libpython3.5m.so

Then I typed
find / -name ‘Python.h’

and I obtained
/usr/include/python2.7/Python.h
/usr/include/python3.5m/Python.h

So, in the folder “root” which I get after decompress the root_v5.34.30.source.tar.gz file, I typed

./configure [–with-python-incdir=/usr/include/python2.7/Python.h][–with-python-libdir=/usr/lib/x86_64-linux-gnu/libpython2.7.so]

but I received the following error:

bash: arch: No such file or directory


On the other hand, if I try
git clone git://github.com/rootpy/rootpy.git
python setup.py install --user

I get

ROOT cannot be imported. Is ROOT installed with PyROOT enabled?

How Can I enable PyROOT and then install rootpy?

Thank you very much in advance.

Hi Laura,

could you try a recent version of ROOT, for example 6.12.04 ?

Cheers,
D

Hi Danilo, Thank you for your answer.
I have this earlier version of Root because I am using it in another software (The offline software framework of the Pierre Auger Observatory)

Hi Laura,

I see. I understand the limitation but I cannot but recommend to move to a recent version of ROOT: 5.34.30 dates 2015, the 5 series is frozen since years. Note that we can help you with the technical aspects of the migration as we did for other (LHC) experiments.
Said that, let’s try out a workaround: did you try one of the binary packages that you can find here or one of the central installations on afs?

Cheers,
Danilo

Hi Danilo, I understand, I will try to move to a newer version as soon as possible.
Meanwhile, I didnt try the binary packages, since I have Ubuntu 16.04 LTS and I dont find the bin files for this distribution in the URL

the flags are called “dir” as they expect the directories, not the files; i.e. /usr/include/python2.7 and /usr/lib/x86_64-linux-gnu, not the .h and .so. Also, make sure that that python2 is the first “python” executable in $PATH.

Aside, python is enabled by default and normally the script can pick up the include and library paths from the location of the executable. Did you try to just run “configure”?

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