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

Sibylle Koczian nulla.epistola at web.de
Tue Jan 16 12:00:33 EST 2024


Am 15.01.2024 um 23:55 schrieb Mats Wichmann via Python-list:
> On 1/15/24 12:01, Thomas Passin via Python-list wrote:
>> On 1/15/2024 1:26 PM, Mats Wichmann via Python-list wrote:
>> Python from the App Store is not the same as Python from python.org:
> 
> yes. this question is about the python.org distribution. but, Windows 
> natively has something called python.exe and python3.exe which is 
> interfering here, IF the python.org install isn't directed to put itself 
> into the path, AND if the "#!/usr/bin/env python3" form is used, causing 
> a search in PATH, which is the setup Sibylle has described, unless I've 
> misunderstood details.
> 

No, you didn't misunderstand any detail. It's exactly right. My Windows 
10 box doesn't find anything for "where python", "where python3", while 
the new Windows 11 machine finds the Microsoft stub. "Irritating" is a 
very friendly attribute for that thing. Why must it be called 
"python.exe" and not something else like the installation files from 
python.org?

I'll stop using "/env" - hopefully that won't create problems with the 
scripts I use in the Linux VM. But in that case I'll know what's up.

Thank you very much!
Sibylle




More information about the Python-list mailing list