[Rivet] The rivet Python module could not be loaded?

Andy Buckley andy.buckley at cern.ch
Wed Jan 25 16:10:32 GMT 2017


Hi Cheng,

Ok... I think I know what the problem is. look in a bit more detail at 
the "import rivet" error message now, and I see that the complaint about 
GCC version is actually coming from the HepMC library. From its path it 
is built with GCC 4.9, but your setup is using the lxplus system version 
of GCC: 4.4.7

There's no dedicated lsetup command for gcc, although you can use lcgenv 
or directly source the script at 
/cvmfs/sft.cern.ch/lcg/releases/LCG_85/gcc/4.9.3/x86_64-slc6/setup.sh . 
Probably the easiest way, though, is to call "lsetup root" which 
currently uses GCC 4.9. The ATLAS Python 2.7 was built with GCC 4.8, but 
that doesn't seem to be a problem.

Andy


On 24/01/17 10:54, Cheng Chen wrote:
> Hi Andy,
>
> Thanks for you reply, I reopened a new lxplus session and followed the
> steps below:
>
> setupATLAS -> lsetup python -> source rivetenv.sh -> import rivet in python
>
> The problem still the same, and now, the PYTHONPATH is laconic:
>
>
>     [chenc at lxplus0107 rivet]$ echo $PYTHONPATH
>     /afs/cern.ch/user/c/chenc/software/rivet/lib/python2.7/site-packages:/afs/cern.ch/user/c/chenc/software/rivet/lib/python2.7/site-packages:
>     <http://cern.ch/user/c/chenc/software/rivet/lib/python2.7/site-packages:/afs/cern.ch/user/c/chenc/software/rivet/lib/python2.7/site-packages:>
>
> And my python version is:
>
>     [chenc at lxplus0107 rivet]$ python -V
>     Python 2.7.4
>
>
> Cheers
> Cheng
>
>> On 24 Jan 2017, at 11:34, Andy Buckley <a.g.buckley at gmail.com
>> <mailto:a.g.buckley at gmail.com>> wrote:
>>
>> Hi Cheng,
>>
>> The versions you are building are fine, but I see a reference to
>> rivet/1.5.0 in your PYTHONPATH! My guess is that the Python interface
>> is accidentally loading an old build of Rivet, which was made for a
>> different architecture/GCC version... hence the GLIBCXX error.
>>
>> Andy
>>
>>
>>
>> On 24/01/17 10:24, Cheng Chen wrote:
>>> Hello all,
>>>
>>> I followed the prescription
>>> in https://rivet.hepforge.org/trac/wiki/GettingStarted to install the
>>> rivet in my lxplus session, however there is an error shows it cannot
>>> import the module correctly:
>>>
>>>    [chenc at lxplus0107 rivet]$ rivet --help
>>>    The rivet Python module could not be loaded: is your PYTHONPATH set
>>>    correctly?
>>>
>>>
>>> Then I tried to "import rivet” directly on python, this shows a
>>> ImportError:
>>>
>>>
>>>    >>> import rivet
>>>    Traceback (most recent call last):
>>>      File "<stdin>", line 1, in <module>
>>>      File
>>>    "/afs/cern.ch/user/c/chenc/software/rivet/lib/python2.7/site-packages/rivet/__init__.py
>>> <http://cern.ch/user/c/chenc/software/rivet/lib/python2.7/site-packages/rivet/__init__.py>",
>>>    line 12, in <module>
>>>        from rivet.core import *
>>>    ImportError: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not
>>>    found (required by
>>>    /cvmfs/sft.cern.ch/lcg/releases/LCG_85/HepMC/2.06.09/x86_64-slc6-gcc49-opt/lib/libHepMC.so.4
>>> <http://sft.cern.ch/lcg/releases/LCG_85/HepMC/2.06.09/x86_64-slc6-gcc49-opt/lib/libHepMC.so.4>)
>>>
>>>
>>>
>>> And I listed my PATH info below:
>>>
>>>    [chenc at lxplus0107 rivet]$ echo $PYTHONPATH
>>>    /afs/cern.ch/user/c/chenc/software/rivet/lib/python2.7/site-packages:/afs/cern.ch/user/c/chenc/software/rivet/lib/python2.7/site-packages:/afs/cern.ch/sw/lcg/external/MCGenerators/agile/1.2.0/i686-slc5-gcc43-opt/lib/python2.5/site-packages:/afs/cern.ch/sw/lcg/external/MCGenerators/rivet/1.5.0/i686-slc5-gcc43-opt/lib/python2.6/site-packages:/afs/cern.ch/sw/lcg/external/MCGenerators/agile/1.2.0/i686-slc5-gcc43-opt/lib/python2.5/site-packages:/afs/cern.ch/sw/lcg/external/MCGenerators/rivet/1.5.0/i686-slc5-gcc43-opt/lib/python2.6/site-packages:/afs/cern.ch/sw/lcg/external/MCGenerators/rivet/1.5.0/i686-slc5-gcc43-opt/lib/python2.6/site-packages:
>>> <http://cern.ch/user/c/chenc/software/rivet/lib/python2.7/site-packages:/afs/cern.ch/user/c/chenc/software/rivet/lib/python2.7/site-packages:/afs/cern.ch/sw/lcg/external/MCGenerators/agile/1.2.0/i686-slc5-gcc43-opt/lib/python2.5/site-packages:/afs/cern.ch/sw/lcg/external/MCGenerators/rivet/1.5.0/i686-slc5-gcc43-opt/lib/python2.6/site-packages:/afs/cern.ch/sw/lcg/external/MCGenerators/agile/1.2.0/i686-slc5-gcc43-opt/lib/python2.5/site-packages:/afs/cern.ch/sw/lcg/external/MCGenerators/rivet/1.5.0/i686-slc5-gcc43-opt/lib/python2.6/site-packages:/afs/cern.ch/sw/lcg/external/MCGenerators/rivet/1.5.0/i686-slc5-gcc43-opt/lib/python2.6/site-packages:>
>>>
>>>
>>> Could help me to found where the problem come from?
>>> BTW, I installed with the RIVET_VERSION=2.5.3 and YODA_VERSION=1.6.6. Is
>>> it possible the problem is related to the version I installed?
>>>
>>> Thanks for your help
>>> Cheng
>>>
>>>
>>> _______________________________________________
>>> Rivet mailing list
>>> Rivet at projects.hepforge.org <mailto:Rivet at projects.hepforge.org>
>>> https://www.hepforge.org/lists/listinfo/rivet
>>>
>>
>>
>> --
>> Dr Andy Buckley, Lecturer / Royal Society University Research Fellow
>> Particle Physics Expt Group, University of Glasgow
>


-- 
Dr Andy Buckley, Lecturer / Royal Society University Research Fellow
Particle Physics Expt Group, University of Glasgow


More information about the Rivet mailing list