Failed to access python version of LHAPDF
Hello,
When launching a run in MadGraph5, the following error appears:
"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 the LHAPDF library location to LD_LIBRARY_PATH (linux) or DYLD_LIBRARY_PATH (mac os x). The required LD_LIBRARY_PATH is /afs/cern.
I am working on lxplus7, so CentOS7.
I've tried following previous advice found at https:/
How can I resolve this issue? I am not an expert so thank you for your help.
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- 2020-12-01
- Last reply:
- 2020-12-01
Hi,
I have a couple of questions:
- Which version of python3 are you using? (python3 --version)
- are you running ./bin/mg5_aMC or do you use a wrapper around that executable (in that case please check the python version used to run MG5aMC)
- HEPTools/
- Do you have the following directory: HEPTools/
(replace python3.6 by the one corresponding to the python version that you are effectively using)
Cheers,
Olivier
Alberto Rescia (arescia) said : | #2 |
Dear Olivier,
I am using Python 3.6.8 and I am running ./bin/mg5_aMC. You're right about the path - I confused bin for lib, so the python 3.6 directory is found in HEPTools/
Thanks again for your help.
-Alberto
Hi,
Then the first things to check is the following:
1) setup your environment as for the mG5amc run ( LD_LIBRARY_PATH and PYTHONPATH)
2) run your python versionn
3) type "import lhapdf"
and see if works or not.
if it does,
then this would be surprising
Do you have any environment variable related to lhapdf:
printenv | grep LHA
Cheers,
Olivier
Alberto Rescia (arescia) said : | #4 |
Hi,
When I try to import lhapdf in the python3 shell, it does not work. I also do not have any environment variabile related to lhapdf.
-Alberto
Actually are you sure that your run python3.6?
MG5aMC should requires python3.7 as a minimum. (or 2.7)
I know that some CMS people hack MG5aMC to support python 3.6 but the official version does not support it.
>When I try to import lhapdf in the python3 shell, it does not work.
Good then this means that your installation of lhapdf is not setup for python3.6 ...
The best is likely to re-install lhapdf via "install lhapdf6" to be sure to use the same python version
Cheers,
olivier
Can you help with this problem?
Provide an answer of your own, or ask Alberto Rescia for more information if necessary.