You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cause: python3.exe is a 0-byte stub file in %USERPROFILE%\AppData\Local\Microsoft\WindowsApps, which is in PATH. The PSF installer creates python.exe, but not python3.exe. (When python3 is typed directly into command prompt, this stub causes Store to be launched. It offers to install a Store App version of an obsolete release of python.)
Workaround: Delete the 0-byte stub so that py.exe doesn’t invoke it.
Proposed long-term fix: For a script with a "/usr/bin/env" shebang, py.exe should check size of program found in path and act as if a 0 byte .exe doesn’t exist.
Alternate fix: Installer could create a python3.exe in the installation directory.
Screenshot of Store offering:
CPython versions tested on:
3.12
Operating systems tested on:
Windows
The text was updated successfully, but these errors were encountered:
This is known ##100107 Currently, one should leave off or remove /env to avoid the path search that finds the stub.
Unfortunately, macOS has an almost obsolete version of python in /usr/bin/python3, so the shebang line with /usr/bin/env is necessary for cross-platform scripts:
bookworm@bookworm-mbp ~ % /usr/bin/python3 -V
Python 3.9.6
bookworm@bookworm-mbp ~ % type python3
python3 is /opt/homebrew/bin/python3
Bug report
Bug description:
hello.py:
hello_noshb.py:
Here is a screenshot of the silent failure.

Cause: python3.exe is a 0-byte stub file in %USERPROFILE%\AppData\Local\Microsoft\WindowsApps, which is in PATH. The PSF installer creates python.exe, but not python3.exe. (When python3 is typed directly into command prompt, this stub causes Store to be launched. It offers to install a Store App version of an obsolete release of python.)
Workaround: Delete the 0-byte stub so that py.exe doesn’t invoke it.
Proposed long-term fix: For a script with a "/usr/bin/env" shebang, py.exe should check size of program found in path and act as if a 0 byte .exe doesn’t exist.
Alternate fix: Installer could create a python3.exe in the installation directory.
Screenshot of Store offering:

CPython versions tested on:
3.12
Operating systems tested on:
Windows
The text was updated successfully, but these errors were encountered: