Versioning Difference?

what should i understand from the below image w.r.t Versions…

That you have multiple version installed. Check py -0. py is a launcher able to select between multiple different installs of python.

1 Like

Are you running this from VS Code? The version of Python the py command launches might be different from the version selected for your workspace in VSC. Also, they recently made a change where if your selected interpreter is a venv, it will activate it even if it doesn’t show the (.venv) at the beginning of the line in the terminal.

It’s not really “activated”; rather, the IDE uses the explicit path to the venv’s Python executable (you can see this in the screenshot). All that activating a venv really does is to set up some environment variables - so that the prompt changes, and so that python will be found in a specific place via PATH - and set up for deactivation. It’s never really necessary, just a convenience. Activation also only affects the current shell, since each shell gets its own environment variables. (The ones that you set in Windows are defaults that each new shell gets initialized with.)

1 Like

The change I was referring to is purely visual; the terminal will use the interpreter selected in the workspace regardless of whether the venv appears to be active or not, if that option is selected in VSC (which it now is by default.) Was switching folders recently and got a popup stating that was the case.