OSError No such file or directory when generating events for run

Bug #1211777 reported by Stephen Lloyd
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MadGraph5_aMC@NLO
Fix Released
Undecided
Olivier Mattelaer

Bug Description

Hello,

I have had MadGraph working on other machines but I am getting this error when launching my process on this new laptop. Please see the attached file for the exact error.

OS: Arch Linux 3.11-rc3
MG Version: 1.5.11
Python 2.7

Regards,
Steve

Related branches

Revision history for this message
Stephen Lloyd (slloyd1990) wrote :
Revision history for this message
Stephen Lloyd (slloyd1990) wrote :

It turns out this was a problem with how the program attempts to run the python environment. The scripts have the !#/usr/bin/python etc shebang hardcoded at the top. I have python 2.7 installed as "python2" rather than "python" so this will not work. This is fairly standard for arch linux users who will have gotten python from the official repositories via pacman. This means that some of the scripts that were used in the compilation would not work, even when attempting to force the use of python2 through "python2 bin/mg5".

I fixed this by making a simlink of python2 to python:

$ ln -s /usr/bin/python2 /usr/bin/python
$ ln -s /usr/bin/python2-config /usr/bin/python2-config

This fix will only work if you do not have python 3 installed to run by default when typing "python". There are more elegant fixes out there for running python 3 and python 2 along side eachother. Fortunately, I do not have python 3 installed at this moment in time.

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote : Re: [Bug 1211777] OSError No such file or directory when generating events for run

Hi Stephen,

Thanks so much for the bug report and even more for the resolution, this is really useful.
I'll figure out on how to fix this in a fully automatic way.

Thanks,

Olivier

On Aug 14, 2013, at 8:11 AM, Stephen Lloyd <email address hidden> wrote:

> It turns out this was a problem with how the program attempts to run the
> python environment. The scripts have the !#/usr/bin/python etc shebang
> hardcoded at the top. I have python 2.7 installed as "python2" rather
> than "python" so this will not work. This is fairly standard for arch
> linux users who will have gotten python from the official repositories
> via pacman. This means that some of the scripts that were used in the
> compilation would not work, even when attempting to force the use of
> python2 through "python2 bin/mg5".
>
> I fixed this by making a simlink of python2 to python:
>
> $ ln -s /usr/bin/python2 /usr/bin/python
> $ ln -s /usr/bin/python2-config /usr/bin/python2-config
>
> This fix will only work if you do not have python 3 installed to run by
> default when typing "python". There are more elegant fixes out there
> for running python 3 and python 2 along side eachother. Fortunately, I
> do not have python 3 installed at this moment in time.
>
> --
> You received this bug notification because you are a member of MadTeam,
> which is subscribed to MadGraph5.
> https://bugs.launchpad.net/bugs/1211777
>
> Title:
> OSError No such file or directory when generating events for run
>
> Status in The MadGraph Matrix Element Generator version 5:
> New
>
> Bug description:
> Hello,
>
> I have had MadGraph working on other machines but I am getting this
> error when launching my process on this new laptop. Please see the
> attached file for the exact error.
>
> OS: Arch Linux 3.11-rc3
> MG Version: 1.5.11
> Python 2.7
>
> Regards,
> Steve
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/madgraph5/+bug/1211777/+subscriptions

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Hi Stephen,

I think that, thanks to your help, I've fixed this problem.
the "correct" fix is simple:
at line 2535 of file madgraph/madevent_interface.py
replace 'python'
by sys.executable
so that it transfer the information of which version of python to use.

Thanks a lot,

Olivier

Changed in madgraph5:
assignee: nobody → Olivier Mattelaer (olivier-mattelaer)
status: New → Fix Committed
Changed in madgraph5:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.