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

Fernando Pérez fperez528 at yahoo.com
Mon Dec 17 10:41:06 EST 2001

Trond Eivind Glomsrød wrote:

>> Why won't Redhat upgrade their software?
> Compatiblity. Programs for RHL 7 should run just fine on 7.2 as well.
> When we start a new series, we will upgrade to the newest python
> available at the time, port the software using python to that and
> stick with this release for that series of Red Hat Linux releases.

I see someone from RH is listening, so let me ask again, and apologies for 
any inflammatory language in my first post. But the issue made me waste so 
many hours this past week that I wasn't in a particularly good mood about it.

I understand you compatibility issues. On the other hand, I'm sure you 
realize you are breaking an extremely widely used convention by installing 
the currently standard series of python as /usr/bin/python2, since that means 
the idiom '#!/usr/bin/env python' won't work for many people, and it will be 
particularly suprising to those who assumed they had installed Python 2.x. I 
know, they can always go and fix all their scripts, but that puts an undue 
burden on the user, it seems to me.

I see a few options for RedHat to do things 'right' for your users in terms 
of providing a saner python environment without breaking your own internal 

1) Upgrade your internal anaconda and other system code to work with Python 
2.x, *without requiring it*. This way you could ship 7.2 with python 2.x as 
the default python and the same programs would still run under python 1.x in 
older redhat releases. This shouldn't be too hard at all, since almost all of 
python 1.5 code runs unchanged under 2.x. In fact I suspect the code may 
actually work already, once the support packages are copied to the right 
place (haven't had time to try). If that's the case, it is a real shame that 
you put pyhton1.5 as the system default without any real techical 


2) Change *only* the first line in your system python scripts to explicitly 
point to /usr/bin/python1.5. I don't know if this would change anything with 
respect to your older releases, but the code itself wouldn't be affected. 
Again, this would allow python 2.x to be the default at /usr/bin/python with 
absolutely minor changes to all your system scripts. And if someone is going 
to install system 7.2 scripts on a 7.1 machine, as bizarre as that sounds, a 
simple fix would be for them to link python1.5 to python.

These seem to be perfectly reasonable solutions, while the current setup 
leaves the users in a particularly unpleasant situation: any code you run 
with '#!/usr/bin/env python' will trigger a call to python1.5, which may 
cause it not to run (if it needs python2 features), but you can't change the 
system default without breaking fundamental functionality. 

So could you explain to us why RedHat chose not to allow their users to use 
python2 as the standard system default, even though as I pointed, there are 
very reasonable ways of maintaining compatibility for your own scripts?



More information about the Python-list mailing list