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

Mats Wichmann mats at wichmann.us
Mon Jan 15 13:28:03 EST 2024


On 1/15/24 09:44, Sibylle Koczian via Python-list wrote:

> In the Python documentation for versions 3.11 and 3.12 I found no 
> differences regarding py.exe and shebang lines.
> 
> Then I removed the "/env" from the shebang lines and could start the 
> scripts from the second computer. That certainly is a solution, but why???
> 
> Sibylle

also, it looks like you can disable the PATH-searching behavior of the 
/usr/bin/env virtual path:

 > The environment variable PYLAUNCHER_NO_SEARCH_PATH may be set (to any 
value) to skip this search of PATH.



More information about the Python-list mailing list