Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

Michael Torrie torriem at gmail.com
Sat Dec 23 11:35:42 EST 2023


On 12/22/23 20:56, Thomas Passin via Python-list wrote:
> It's just better not to make assumptions about which version of Python 
> will be running. Just specify it yourself when you can, and then you can 
> be sure.

Precisely, which is why the shebang is so useful, even on Windows with
py launcher.  For example, set the shebang to:

#!/usr/bin/python3.6

And py launcher will always try to run it with Python 3.6.



More information about the Python-list mailing list