Question #818696 “Failed to access python version of LHAPDF” : Questions : MadGraph5_aMC@NLO

Hi, recently I’m facing python compatibility issue.
OS : Linux (CentOS7)
By default in my lhapdf6 python2.7 is installed : HEPTools/lhapdf6/lib64/python2.7/site-packages/

$conda activate (I’m using python 3.9)
$python bin/mg5_aMC
$launch myevent

…

[Error message]
Failed to access python version of LHAPDF: If the python interface to LHAPDF is available on your system, try adding its location to the PYTHONPATH environment variable and theLHAPDF library location to LD_LIBRARY_PATH (linux) or DYLD_LIBRARY_PATH (mac os x).The required LD_LIBRARY_PATH is /home/stiger97/programs/MG5_aMC_v2_9_14/HEPTools/lhapdf6//lib

… so then I checked ~/.bashrc

@1. export PYTHONPATH=/home/stiger97/programs/MG5_aMC_v2_9_14/HEPTools/lhapdf6/lib64/python2.7/site-packages/:$PYTHONPATH

@2. export PYTHONPATH=/opt/ohpc/pub/utils/conda/anaconda3/lib/python3.9/site-packages/:$PYTHONPATH
LD_LIBRARY_PATH=/home/stiger97/programs/MG5_aMC_v2_9_14/HEPTools/lhapdf6/lib:/home/stiger97/programs/MG5_aMC_v2_9_14/Delphes:$LD_LIBRARY_PATH

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/stiger97/programs/MG5_aMC_v2_9_14/HEPTools/lhapdf6/lib

….

LD_LIBRARY_PATH is fine, and I guess the problem comes form PYTHONPATH cause it seems the others use python3 ..?
So I’ve tried both path @1. and @2 (my conda python path). (I did source ~/.bashrc) but got the same problem.

Thanks.

Read more here: Source link