-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed as not planned
Labels
Description
Bug report
Have the following:
py.exe
set-up to start Python programs (withPATHEXT
env var set to...;.PY
)venv
environment with Python 3
Now running Python program with shebang #! /usr/bin/env python
works fine, but #! /usr/bin/env python3
does not.
I am running the same script on Debian 11:
- Debian 11 has only
python3
andpython3.9
executables system-wide, sopython
shebang does not work, butpython3
works. - Debian 11
venv
environment (used during development) haspython
,python3
andpython3.9
executables, so bothpython
andpython3
shebangs work. - Windows 11 has only
python.exe
undervenv
, sopython3
shebang picks-up MS Store version and not thevenv
version, so it has wrong modules.
On Debian 11 the only usable shebang for all my use cases is python3
, but that one does not work under Windows.
Current workaround is to make a copy on Windows in venv/Scripts/python.exe
to venv/Scripts/python3.exe
. Then the python3
shebang works fine.
Your environment
- Debian 11 with Python 3.9
- Windows 11 22H2
py.exe
left by installation of previous Python MSI version after uninstalling Python (and intentionally keepingpy.exe
).- Python 3.11 installed via MS Store