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

2024-01-23 Thread Sibylle Koczian via Python-list

Am 16.01.2024 um 23:44 schrieb Barry via Python-list:




On 16 Jan 2024, at 17:11, Sibylle Koczian via Python-list 
 wrote:

while the new Windows 11 machine finds the Microsoft stub


You can turn off the stub in windows settings. The magic windows jargon is
“App Execution Aliases”. Once you find it in settings you can turn off
the python and python3 aliases.



Thank you! That did it. These two settings were off in the older Windows 
10 installation and on in the new Windows 11. Changed there and the 
shebang lines with "/env" work as expected.


I didn't remember ever seeing these settings on my "old" computer, but 
it seems I turned them off six years ago and completely forgot about 
them. Or could that have been an older default?


"python" or "python3" in the shebang line doesn't seem to make a 
difference, at least not on machines that never saw Python 2.


Very glad to know what was the matter here,
Sibylle

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


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

2024-01-23 Thread Sibylle Koczian via Python-list

Am 17.01.2024 um 19:44 schrieb Mats Wichmann via Python-list:


Be interesting to know if your WIndows 10 has those files in place, and 
it's just a missing path entry (a good thing, perhaps) that's causing it 
not to be found there.



Yes. Python is not on the Path - by design.

while the new Windows 11 machine finds the Microsoft stub. 


Not any more - see my reply to Barry.

Thanks to all who answered!
Sibylle


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