issue in generating events

Asked by Jyotismita Adhikary

When running Madgraph to generate events I am getting error:

/Users/adhikaryj/Downloads/MG5_aMC_v2_7_3/share/LHAPDF
Command "generate_events -f" interrupted with error:
ImportError : No module named madgraph.various.misc
Please report this bug on https://bugs.launchpad.net/mg5amcnlo
More information is found in '/Users/adhikaryj/Downloads/MG5_aMC_v2_7_3/Processes/Neutrinophillic/current/run_01_tag_1_debug.log'.
Please attach this file to your report.
quit

My python version is 2.7, Madgraph version is 2.7.3 and lhapdf version is 6.2.3. (My code is compatible only with python2.7) I have already checked Madgraph and it does have the 'various' module installed which has misc.py file in it. I do not understand the root of the problem. kindly help

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Olivier Mattelaer
Solved:
Last query:
Last reply:
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#1

Hi,

I agree with you that this is weird. This is likely a pythonpath issue. I guess this is an old install (otherwise why used such old version which is full of known bug) so did you update your PYTHONPATH recently?
(madgraph should not be added to the pythonpath maybe that this is your issue)

I do not have access anymore to any machine with python2.7 and we do not maintain/guarantee python2.7 support since many years now. Additionally, we do support MG5aMC (LTS version) 2.9.x and a development oriented release (3.5.3). Older version are out of support especially for this kind of issue which are likely impossible to reproduce.

Technically 2.9.x might still be running with python2.7 (I have actually no clue if it does but if someone report bug report that those version are not python2.7 compatible we will fix them (if possible).

Cheers,

Olivier

Revision history for this message
Jyotismita Adhikary (zinki-123) said :
#2

Thank you for your reply. I do not understand why Madgraph should not be in python path although I do not have it added. Can you clear this quarry? I think then I should proceed with reporting a bug.

Revision history for this message
Jyotismita Adhikary (zinki-123) said :
#3

On the other hand. I have also installed python3.7 in a different conda environment and I have madgraph version 3.5.3 there. With that, when generating events, I am getting this particular error:
File "/Users/adhikaryj/Downloads/MG5_aMC_v3_5_3/Processes/Neutrinophillic/./current/bin/generate_events", line 53
    print "For tab completion and history, install module readline."
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Is there any file why I can modify to make the executable suitable for python3?

Revision history for this message
Sihyun Jeon (shjeon) said :
#4

you don't have the pip module that is needed

just do

python3 -m pip install pyreadline

to install missing module

Revision history for this message
Sihyun Jeon (shjeon) said :
#5
Revision history for this message
Sihyun Jeon (shjeon) said :
#6

or actually, do

python3 -m pip install readine

Revision history for this message
Best Olivier Mattelaer (olivier-mattelaer) said :
#7

Hi, the actual issue is not that readline is installed or not but the fact that the code was generated for python2 and not for python3.

This is likely again an issue with PYTHONPATH since some" import madgraph" command returns a non local version of the installation making 3.5.3 to use the template of some (older version of python).
can you print your PYTHONPATH
and can you try withon python3 to do
import madgraph
(it should normally fail)

The reason why, is that madgraph5 is shipped/designed as a python code and not as a python library.
Our main interface is an event loop (suitable for graphical interface --even if we did not generate one yet-- and we shipped our own command line).

Cheers,

Olivier

Revision history for this message
Jyotismita Adhikary (zinki-123) said :
#8

Thanks Olivier Mattelaer, that solved my question.