Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
Closed
Description
Bug report
This Python scripthello.pyw does not start on my PC when I double click it in Windows Explorer.
#!/usr/bin/env python3from tkinter import messageboxmessagebox.showinfo(message='hello, world')
Instead, a console window pops up and disappears instantly.
Now I modify the shebang as follows:
#!/usr/bin/env pythonfrom tkinter import messageboxmessagebox.showinfo(message='hello, world')
On double-clickinghello.pyw,a console opens, then the message box appears.
Now I remove the shebang:
from tkinter import messageboxmessagebox.showinfo(message='hello, world')
On double-clickinghello.pyw, the message box appears as expected.
This misbehavior was observed with the introduction of Python 3.11. It was not like this until version 3.10.8.
Your environment
- CPython versions tested on: 3.11.1
- Operating system and architecture: Windows 10 22H2 x64
I have implemented quite a few open source programs with Python, all of which have a shebang for working across platforms. On my download pages I had to generally discourage the use with Python 3.11.