[issue46002] py Launcher for Windows with MSYS2

2021-12-08 Thread Zernoxi
Zernoxi added the comment: True, that would work but it not ideal "Unix". I'll closed this since not unintended behavior. -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue46002] py Launcher for Windows with MSYS2

2021-12-07 Thread Eryk Sun
Eryk Sun added the comment: You can use "#!python", or "#!/usr/bin/python", or "#!/usr/local/bin/python". They're all equivalent, and they do not search PATH. Since no wanted version is specified, the launcher will look for a version to run in the following order: an active virtual environme

[issue46002] py Launcher for Windows with MSYS2

2021-12-07 Thread Zernoxi
Zernoxi added the comment: Is there a way to not parse certain paths in the PATH environment variable for the shebang: "#!/usr/bin/env python". I get that it is trying to mimic Unix "env" function but is it not conflicting if there is a python install but it is not registered in registry? -

[issue46002] py Launcher for Windows with MSYS2

2021-12-06 Thread Zernoxi
Zernoxi added the comment: My bad, I guess its not a bug. Didn't read the documents correctly. -- ___ Python tracker ___ ___ Python

[issue46002] py Launcher for Windows with MSYS2

2021-12-06 Thread Zernoxi
Zernoxi added the comment: Is there a way to "ignore" MSYS2 "bin" folder? Because "pyenv" is a wrapper for python versions and its python.exe is not explicitly in the PATH environment variable. -- ___ Python tracker

[issue46002] py Launcher for Windows with MSYS2

2021-12-06 Thread Zernoxi
Zernoxi added the comment: I did some more testing more testing some more testing and saw that eryksun pointed out that the PATH environment variable is also being checked. I thought that it only checked for registered pythons but anyway. If I remove the "bin" folder to MSYS2 then the issue

[issue46002] py Launcher for Windows with MSYS2

2021-12-06 Thread Eryk Sun
Eryk Sun added the comment: The shebang "#!/usr/bin/env python" searches PATH for "python" plus the PATHEXT file extensions. The shebang "#!/usr/bin/env python3" uses the highest version of Python 3 from the registry. It doesn't search PATH because Python installations do not necessarily in

[issue46002] py Launcher for Windows with MSYS2

2021-12-06 Thread Steve Dower
Steve Dower added the comment: ("2" and "3" are just arbitrary numbers... substitute however many Python runtimes you actually have, or "N" and "N+1" if you prefer.) -- ___ Python tracker __

[issue46002] py Launcher for Windows with MSYS2

2021-12-06 Thread Steve Dower
Steve Dower added the comment: So if I've understood you, there are three Python installs on your machine. Two of them are Windows builds, which are listed in the registry and discovered by py.exe -0p. The third is the MSYS2 build, which is *not* listed in the registry and is *not* discovere

[issue46002] py Launcher for Windows with MSYS2

2021-12-06 Thread Zernoxi
Zernoxi added the comment: I am launching "py" from a regular prompt ("powershell"). I should only have 2 registered python versions in the registry. "py -0p" shows the correct information. One thing to note is that if I "#!/usr/bin/env python3 -V", it will show the correct default python3

[issue46002] py Launcher for Windows with MSYS2

2021-12-06 Thread Steve Dower
Steve Dower added the comment: Are you launching "py" from inside MSYS2? Or a regular prompt? What does the output of "py -0p" show? (It should list all the discovered installs) We might need someone who understands how MSYS2 works here, because I don't. --

[issue46002] py Launcher for Windows with MSYS2

2021-12-06 Thread Tze Chian Kam
Tze Chian Kam added the comment: This is not in a a virtual environment by the way. -- ___ Python tracker ___ ___ Python-bugs-list

[issue46002] py Launcher for Windows with MSYS2

2021-12-06 Thread Tze Chian Kam
New submission from Tze Chian Kam : Using "pyenv" for python installations. "py" launcher detects all installed python versions from "pyenv". When using the shebang feature, if the following shebang is specified, "#!/usr/bin/env python -V", it will detect python version of "3.9.9" from MSYS2