Pyroot libraries not found

Asked by sylvain fichet

Dear MadAnalysis Team,

I am trying to install ma5 on a couple of linux machines. I am having the same problem on both computers.

I install python, then install root, configuring root using ./configure --enable-python

Right after installing everything, ma5 works fine. But after rebooting the computer, I get the following error:

Checking mandatory packages:
     - python [OK]
     - python library: numpy [OK]
     - g++ [OK]
     - GNU Make [OK]
     - Root [OK]
     - PyRoot libraries [FAILURE]
 ** ERROR: ROOT file called '/usr/lib/x86_64-linux-gnu/libPyROOT.so' is not found
 ** ERROR: Please check that ROOT is properly installed.

Indeed, the pyroot library containing libPyROOT.so is not in /usr/lib/x86_64-linux-gnu, but in my home, /home/root/lib/libPyROOT.so

So I suppose I should just set the environment so that madanalysis finds the pyroot libraries. But I made many tries using
$PYTHONPATH, $LD_LIBRARY_PATH, it still won't work... May you help me ?

Cheers
Sylvain

Question information

Language:
English Edit question
Status:
Solved
For:
MadAnalysis 5 Edit question
Assignee:
No assignee Edit question
Solved by:
sylvain fichet
Solved:
Last query:
Last reply:
Revision history for this message
Benjamin Fuks (fuks) said :
#1

Hi Sylvain,

Have you executed the "thisroot.sh" script provided with root in order to setup all environment variables in a suitable way before starting ma5?

Regards,

Benjamin

On 18 Jul 2015, at 03:41 , bixiga <email address hidden> wrote:

> New question #269369 on MadAnalysis 5:
> https://answers.launchpad.net/madanalysis5/+question/269369
>
> Dear MadAnalysis Team,
>
> I am trying to install ma5 on a couple of linux machines. I am having the same problem on both computers.
>
> I install python, then install root, configuring root using ./configure --enable-python
>
> Right after installing everything, ma5 works fine. But after rebooting the computer, I get the following error:
>
> Checking mandatory packages:
> - python [OK]
> - python library: numpy [OK]
> - g++ [OK]
> - GNU Make [OK]
> - Root [OK]
> - PyRoot libraries [FAILURE]
> ** ERROR: ROOT file called '/usr/lib/x86_64-linux-gnu/libPyROOT.so' is not found
> ** ERROR: Please check that ROOT is properly installed.
>
> Indeed, the pyroot library containing libPyROOT.so is not in /usr/lib/x86_64-linux-gnu, but in my home, /home/root/lib/libPyROOT.so
>
> So I suppose I should just set the environment so that madanalysis finds the pyroot libraries. But I made many tries using
> $PYTHONPATH, $LD_LIBRARY_PATH, it still won't work... May you help me ?
>
> Cheers
> Sylvain
>
>
>
> --
> You received this question notification because you are an answer
> contact for MadAnalysis 5.

Revision history for this message
sylvain fichet (sfcht) said :
#2

Hi Benjamin,

Thanks a loy for your quick reply.
Yes I do run "source ./bin/thisroot.sh" before starting ma5.

Cheers
Sylvain

Revision history for this message
Benjamin Fuks (fuks) said :
#3

Hi Sylvain,

Could you please double-check the vlaue of the ROOTSYS variable?

On 18 Jul 2015, at 14:16 , bixiga <email address hidden> wrote:

> Question #269369 on MadAnalysis 5 changed:
> https://answers.launchpad.net/madanalysis5/+question/269369
>
> Status: Answered => Open
>
> bixiga is still having a problem:
> Hi Benjamin,
>
> Thanks a loy for your quick reply.
> Yes I do run "source ./bin/thisroot.sh" before starting ma5.
>
> Cheers
> Sylvain
>
> --
> You received this question notification because you are an answer
> contact for MadAnalysis 5.

Revision history for this message
sylvain fichet (sfcht) said :
#4

Hi Benjamin,

The ROOTSYS variable is empty...
So it looks like the thisroot.sh did not work for some reason...

Revision history for this message
sylvain fichet (sfcht) said :
#5

Hi again,

So I set ROOTSYS by hand, and now my variables are somewhat defined. To be exhaustive:

$ echo $PATH
/home/sylvain/root/bin (+ others)
$ echo $LD_LIBRARY_PATH
/home/sylvain/root/lib
$ echo $DYLD_LIBRARY_PATH
/home/sylvain/root/lib
$ echo $SHLIB_PATH
/home/sylvain/root/lib
$ echo $LIBPATH
/home/sylvain/root/lib
$ echo $PYTHONPATH
/home/sylvain/root/lib
$ echo $MANPATH
/home/sylvain/root/man

Still, ma5 still does not find pyroot,
 ** ERROR: ROOT file called '/usr/lib/x86_64-linux-gnu/libPyROOT.so' is not found
 ** ERROR: Please check that ROOT is properly installed.

Any idea ?

Cheers
Sylvain

Revision history for this message
sylvain fichet (sfcht) said :
#6

Hi again Benjamin,

The problem was simply that I was using various shells at the same time. As the variables are set within a given shell, it couldn't work.
Then I got another error:
** ERROR: 'root-config --libdir' indicates a wrong path for ROOT libraries. Please specify the ROOT library path into the environnement variable $PYTHONPATH

I didn't understand that, the paths were correct.

Anyway, I rebuilt root, and now ma5 works smoothly, including after rebooting the system.

Cheers
Sylvain

Revision history for this message
Benjamin Fuks (fuks) said :
#7

Indeed. Could you try to set it independently. I guess this would fix the problem.

Cheers,

Benjamin

On 18 Jul 2015, at 15:06 , bixiga <email address hidden> wrote:

> Question #269369 on MadAnalysis 5 changed:
> https://answers.launchpad.net/madanalysis5/+question/269369
>
> Status: Answered => Open
>
> bixiga is still having a problem:
> Hi Benjamin,
>
> The ROOTSYS variable is empty...
> So it looks like the thisroot.sh did not work for some reason...
>
> --
> You received this question notification because you are an answer
> contact for MadAnalysis 5.