More discussion:

https://unix.stackexchange.com/questions/29608/why-is-it-better-to-use-usr-bin-env-name-instead-of-path-to-name-as-my

On 11/7/2022 5:35 PM, Cameron Simpson wrote:
On 07Nov2022 09:28, Chris Green <c...@isbd.net> wrote:
Chris Green <c...@isbd.net> wrote:
> 3: with your pseudo "python3" script in place, make all the scripts use
> the "#!/usr/bin/env python3" shebang suggested above.
>
Yes, that sounds a good plan to me, thanks Cameron.

Doesn't '#!/usr/bin/env python3' suffer from the same problem as
'#!/usr/bin/python3' in the sense that the env executable might not be
in /usr/bin?

Wouldn't '#! env python3' be better?

The thing after the shebang needs to be a full path.

"env" is in /usr/bin on damn near everything. I think I had to make a symlink on a Solaris system once, but otherwise it has not been a problem for me on many different systems for many years.

Cheers,
Cameron Simpson <c...@cskk.id.au>

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to