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

Sibylle Koczian nulla.epistola at web.de
Sun Jan 14 07:48:22 EST 2024


Am 09.01.2024 um 12:36 schrieb Barry Scott via Python-list:
> 
> 
>> On 7 Jan 2024, at 15:09, Sibylle Koczian via Python-list <python-list at python.org> wrote:
>>
>> Oh, and the two Windows and Python versions are on two different computers.
>>
>> Will remove the "/env" from my shebang lines, even if I don't understand what's happening.
> 
> Thanks for the details.
> 
> Only thing I can think of is that "python" may be defaulting to mean python 2.
> If you use "#!/usr/bin/env python3" it may work on both.

No, it doesn't. That's the form I started with. When it didn't work I 
thought "python3" might be too old, because Python 2 is dead for so long.
> 
> Did you creates a py.ini file to configure py.exe?
> 
> See if you have %userappdata%\py.ini on either windows 10 or windows 11.
> If so what is its contents?

No to both.
> 
> I've tried with and without a py.ini and cannot duplicate what you see.
> 

It really seems strange. Only thing I can think of - and I don't really 
believe in that idea: as far as I know in Windows 11 the handling of 
PATH has changed. My Python isn't on the path, perhaps that is it. A 
shebang line without "/env" doesn't check the path, right?

Thank you for helping,
Sibylle



More information about the Python-list mailing list