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

Chris Barker chrishbarker at attbi.com
Wed Dec 19 14:25:49 EST 2001


"Carl D. Roth" wrote:

> If you want to run python 2 instead of python 1.5 on that system,
> change the 'env' line to refer to 'python2' or 'python2.2'.

This an discussion that came and went as part of one of the discusions
about an incompatable change to Python.

Frankly, while you can certainly start chaning the #! line to point to
the version you need on *nix, that won't help with other OSs. Some folks
suggested a *.py2 extension for Windows, which might work.

Personally, I'd love to see a native Python solution this problem: some
sort of version keyword that would specify what version was required,
and ideally, whatever was in the $PATH called "python" would look for
that keyword, and dispatch the script off to whatever was required. This
would be an all OS solution. On a given system, it would probably be
best if it was not required that al versions actually be installed, but
an error mesage that siad something about a version mismatch would be a
whole lot more useful that just having the scrip tfail in some wierd
way.

It's too late for any solution of this nature to resolve 1.5.* vs 2.*
problems, but at least we could solve this for the future. I'm sure
others on this list could come up with better ideas thatn mine, but I'm
convinced that there really needs to be a Python solution to this
problem, rather than tossing it of to the admistrators of every system
out there!

-Chris



-- 
Christopher Barker,
Ph.D.                                                           
ChrisHBarker at attbi.net                ---           ---           ---
                                     ---@@       -----@@       -----@@
                                   ------@@@     ------@@@     ------@@@
Oil Spill Modeling                ------   @    ------   @   ------   @
Water Resources Engineering       -------      ---------     --------    
Coastal and Fluvial Hydrodynamics --------------------------------------
------------------------------------------------------------------------



More information about the Python-list mailing list