Is there a way to write the shebang line such that it will find the Python3 interpreter, if present?
Naively, from PEP 394 I would expect that #!/usr/bin/env python3 should work.
However, I've noticed that on some systems where python is Python3, they don't provide a python3 alias. On these systems, you'd need to use #!/usr/bin/env python to get Python3.
Is there a robust way to handle this ambiguity? Is there some way to write the shebang line such that it will use python3 if present, but try python if not? (Requiring that end users manually fix their systems to add a python3 alias is not ideal.)