ModuleNotFoundError: No module named 'maddm_interface'

Asked by raseeb haroon

Hello,
I'm trying to use a DM model and need to maddm plugin but am running into a problem.

I have installed maddm using the command -> install maddm

I installed the dependencies using -> pip install scipy
                                                                   -> pip install numpy

Im launching it using the command-> ./maddm.py

ERROR:-
raseeb@raseeb:~/MG5_aMC_v2_9_6/bin$ ./maddm.py
Traceback (most recent call last):
  File "/home/raseeb/MG5_aMC_v2_9_6/bin/mg5_aMC", line 163, in <module>
    __import__('PLUGIN.%s' % options.plugin)
  File "/home/raseeb/MG5_aMC_v2_9_6/PLUGIN/maddm/__init__.py", line 3, in <module>
    import maddm_interface as maddm_interface
ModuleNotFoundError: No module named 'maddm_interface'

Im following the site ( https://launchpad.net/maddm ). Any help would be appreciated.

Cheers,
Raseeb

OS: Ubuntu 22.04.2 LTS
MG5: MG5_aMC_v2_9_6

Question information

Language:
English Edit question
Status:
Solved
For:
MadDM Edit question
Assignee:
Daniele Massaro Edit question
Solved by:
Daniele Massaro
Solved:
Last query:
Last reply:
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#1

Can you show the content of the directory
/home/raseeb/MG5_aMC_v2_9_6/PLUGIN/maddm/

The important point is to check if the file maddm_interface.py does exists.
if not, then I would suggest to redo the installation of the maddm plugin

Cheers,

Olivier

Revision history for this message
raseeb haroon (raseebharoon) said :
#2

It does exist in the directory:-

raseeb@raseeb:~/MG5_aMC_v2_9_6/PLUGIN/maddm$ ls
auxiliary.py Fermi_line_likelihoods maddm_interface.py README
dm_tutorial_text.py __init__.py maddm_run_interface.py Templates
EffOperators init.py MGoutput.py version
ExpData Jfactors __pycache__
Fermi_Data maddm python_templates

Cheers,
Raseeb

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

Then I assign Daniele,

Who might know if they are incompatibility between 2.9.6 and maddm

Cheers,

Olivier

Revision history for this message
Best Daniele Massaro (dmassaro) said :
#4

Hi Raseeb,

I suspect your issue could be linked to the python version. Are you sure you are using Python 2.7?
I can reproduce your problem only if I try to run the latest version of MadDM on top of version 2.9.10 of MadGraph with Python 3 instead of Python 2.

If you run with ./maddm.py likely you're using system Python which for sure is Python 3 and so your error.
Try to install Python 2 and run with:
python2 maddm.py
from inside <Madgraph_folder>/bin directory.

Let me know.

Cheers.
--
Daniele

PS. We are very close to release a Python 3 MadDM.

Revision history for this message
raseeb haroon (raseebharoon) said :
#5

Hi Daniele,

If I check my python version it comes out to be 2.7.18

raseeb@raseeb:~/MG5_aMC_v2_9_6/bin$ python2 --version
Python 2.7.18

When I use the command "python2 maddam.py" I get the following error :-

raseeb@raseeb:~/MG5_aMC_v2_9_6/bin$ python2 maddm.py
madgraph requires the six module. The easiest way to install it is to run "pip install six --user"
in case of problem with pip, you can download the file at https://pypi.org/project/six/ . It has a single python file that you just need to put inside a directory of your $PYTHONPATH environment variable.

Then using the recommended command tell me the package is already downloaded.

raseeb@raseeb:~/MG5_aMC_v2_9_6/bin$ pip install six --user
Requirement already satisfied: six in /usr/lib/python3/dist-packages (1.16.0)

It gives me the same error again when I try launch using the "python2 maddam.py" command.

Regards,
Raseeb

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

Because your default pip is not for Python 2.7.18
so in this case you need to do pip2 install six --user

Revision history for this message
raseeb haroon (raseebharoon) said (last edit ):
#7

Hi All,

 Now I can launch It. Thank you so much for the help.

Cheers,
Raseeb

Revision history for this message
raseeb haroon (raseebharoon) said (last edit ):
#8

Thanks Daniele Massaro, that solved my question.

Revision history for this message
Abdat Mohammed hocine (abdatmoh2020) said :
#10

i have the same error in python3.7 and python2.7
 {

Traceback (most recent call last):
  File "/home/abdatmohamed/Downloads/MG5_aMC_v2.9.18/MG5_aMC_v2_9_18/bin/mg5_aMC", line 168, in <module>
    __import__('PLUGIN.%s' % options.plugin)
  File "/home/abdatmohamed/Downloads/MG5_aMC_v2.9.18/MG5_aMC_v2_9_18/PLUGIN/maddm/__init__.py", line 3, in <module>
    import maddm_interface as maddm_interface
ModuleNotFoundError: No module named 'maddm_interface'

}