/usr/bin/env: python: No such file or directory

Steve Holden sholden at holdenweb.com
Mon Dec 17 09:43:43 EST 2001


"Fernando Pérez" <fperez528 at yahoo.com> wrote ...
> ddidierd78 wrote:
>
> > Hi,
> >
> > I am running redhat 7.2 and installed the following:
> >
> > python2.2-2.2b1-2.i386.rpm
> > python2.2-devel-2.2b1-2.i386.rpm
> > python2.2-tools-2.2b1-2.i386.rpm
> >
> > When trying to run a script, I get the following message:
> >
> > /usr/bin/env: python: No such file or directory
> >
> > additionally the only thing relating to python in /usr/bin is the file
> > python2.2
> >
> >
> > Thanks for any help,
> > Dan
>
> the problem is Rhat installs python1.5 as python and python2.x as python2.
So
> you need to symlink python2.x to python in /usr/bin.
>

It would be safer to modify your scripts to make the shebang line read

#!/usr/bin/env python2

to avoid possible breakage in the Red Hat anaconda adminstration suite. You
will need to create a symbolic link (/usr/bin/python2 --> python2.2) before
the shebang line will work correctly. Or you could just use

#!/usr/bin/env python2.2

but that might be a bit version-specific...

regards
 Steve
--
http://www.holdenweb.com/








More information about the Python-list mailing list