MadGraph stopped working - zlib Module not found - Suddenly!

Asked by bala

Dear MG Team,

I am facing some problems in running my MadGraph. Before a month, I tried installing WHIZARD on my laptop and configure WHIZARD successfully. After that, when I tried today, I am getting the following error:

bala@bala-SVF1521Q1EB:~/TEST_MG5aMC_v2.5_Beta/MG5_aMC_v2_5_0_beta2$ bin/mg5_aMC Traceback (most recent call last):
  File "bin/mg5_aMC", line 123, in <module>
    import madgraph.interface.master_interface as interface
  File "/home/bala/TEST_MG5aMC_v2.5_Beta/MG5_aMC_v2_5_0_beta2/madgraph/interface/master_interface.py", line 39, in <module>
    import madgraph.core.diagram_generation as diagram_generation
  File "/home/bala/TEST_MG5aMC_v2.5_Beta/MG5_aMC_v2_5_0_beta2/madgraph/core/diagram_generation.py", line 27, in <module>
    import madgraph.core.base_objects as base_objects
  File "/home/bala/TEST_MG5aMC_v2.5_Beta/MG5_aMC_v2_5_0_beta2/madgraph/core/base_objects.py", line 26, in <module>
    import madgraph.core.color_algebra as color
  File "/home/bala/TEST_MG5aMC_v2.5_Beta/MG5_aMC_v2_5_0_beta2/madgraph/core/color_algebra.py", line 23, in <module>
    import madgraph.various.misc as misc
  File "/home/bala/TEST_MG5aMC_v2.5_Beta/MG5_aMC_v2_5_0_beta2/madgraph/various/misc.py", line 32, in <module>
    import gzip as ziplib
  File "/usr/local/lib/python2.7/gzip.py", line 9, in <module>
    import zlib
ImportError: No module named zlib

To rectify this error, I have installed the zlib package from this link, https://launchpad.net/ubuntu/xenial/+package/zlib1g-dev in the directory, /usr/local/lib/python2.7

Even after that, I am facing the same error. I don't know what's going on. I would appreciate your help in this regard.

Thanks,
bala

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
Best Olivier Mattelaer (olivier-mattelaer) said :
#1

Hi,

Looks like this is a internal error inside a default python module.
My suggestion would be to recompile/re-install python on your system.

Cheers,

Olivier

> On 24 Apr 2017, at 17:17, bala <email address hidden> wrote:
>
> New question #626856 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/626856
>
> Dear MG Team,
>
> I am facing some problems in running my MadGraph. Before a month, I tried installing WHIZARD on my laptop and configure WHIZARD successfully. After that, when I tried today, I am getting the following error:
>
> bala@bala-SVF1521Q1EB:~/TEST_MG5aMC_v2.5_Beta/MG5_aMC_v2_5_0_beta2$ bin/mg5_aMC Traceback (most recent call last):
> File "bin/mg5_aMC", line 123, in <module>
> import madgraph.interface.master_interface as interface
> File "/home/bala/TEST_MG5aMC_v2.5_Beta/MG5_aMC_v2_5_0_beta2/madgraph/interface/master_interface.py", line 39, in <module>
> import madgraph.core.diagram_generation as diagram_generation
> File "/home/bala/TEST_MG5aMC_v2.5_Beta/MG5_aMC_v2_5_0_beta2/madgraph/core/diagram_generation.py", line 27, in <module>
> import madgraph.core.base_objects as base_objects
> File "/home/bala/TEST_MG5aMC_v2.5_Beta/MG5_aMC_v2_5_0_beta2/madgraph/core/base_objects.py", line 26, in <module>
> import madgraph.core.color_algebra as color
> File "/home/bala/TEST_MG5aMC_v2.5_Beta/MG5_aMC_v2_5_0_beta2/madgraph/core/color_algebra.py", line 23, in <module>
> import madgraph.various.misc as misc
> File "/home/bala/TEST_MG5aMC_v2.5_Beta/MG5_aMC_v2_5_0_beta2/madgraph/various/misc.py", line 32, in <module>
> import gzip as ziplib
> File "/usr/local/lib/python2.7/gzip.py", line 9, in <module>
> import zlib
> ImportError: No module named zlib
>
> To rectify this error, I have installed the zlib package from this link, https://launchpad.net/ubuntu/xenial/+package/zlib1g-dev in the directory, /usr/local/lib/python2.7
>
> Even after that, I am facing the same error. I don't know what's going on. I would appreciate your help in this regard.
>
> Thanks,
> bala
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
bala (kmbala86) said :
#2

Thanks Olivier Mattelaer, that solved my question.