#!/usr/bin/python or #!/usr/bin/env python?
"Martin v. Löwis"
martin at v.loewis.de
Tue Aug 8 17:35:30 EDT 2006
Erik Max Francis schrieb:
>> I use /usr/bin/env if I don't know what the operating system is;
>> some systems don't have Python in /usr/bin. I use /usr/bin/pythonX.Y
>> if I want a specific version on a specific operating system (typically
>> Linux).
>
> Even there, /usr/bin/env pythonX.Y would be a better choice. (Maybe
> that's what you meant.)
I'm uncertain. When I refer to /usr/bin/python2.3, I know I get the
system vendor's installation. When I use /usr/bin/env python2.3, I
may get something that somebody has build and which may not work
at all, or lack certain add-on packages that the script needs.
It's bad when the script works for some users but fails for others.
Regards,
Martin
More information about the Python-list
mailing list