News for hackers. Stuff that matters.
Re:Windows 10 has “python” command that redirects to the Win... by rovr138 on Monday May 04, 2020 @01:12AM (#23064774)
> it just seems to make things even worse for me because now even 'which python' doesn't tell me anything because it directs to some shell script shims that I can't parse or understand.

I understand it’s another layer and for someone not working in it daily, it’s hard.

Some info, the command

    which python
Wouldn’t tell you much anyway. It would just return something like

    /usr/bin/python
Reading a binary wouldn’t lead to much either. If you’re trying to get the version of python, this still works,

    python --version
Pyenv also has this command,

    pyenv version
That also works with pyenv virtualenv (if you’re using it)

If you want all versions installed,

    pyenv versions
Re:Windows 10 has “python” command that redirects to the Win... by jjgreen on Monday May 04, 2020 @06:48AM (#23066493)
Helpfully, Python 3.4 switched from writing --version output from stderr to stdout, so you need capture both :-|