On my system i have both python 3.8 and python 3.9 installed.
In side my settings.json is the following:
{
"python.pythonPath": "C:\\Program Files\\Python\\Python38\\python.exe"
}
When i run my python file in VSCode, all is well. However, i want to open a terminal window to create a virtual environment using the above python install. When select 'Terminal: Create new integrate terminal', a command terminal is opened (i have the default set to cmd).
When i then execute 'python --version'. nothing is printed out.
when i execute 'py --version', i see 'Python 3.9.0'.
If do a 'where python', i see 'C:\Users\<user>\AppData\Local\Microsoft\WindowsApps\python.exe'
If i do a 'where py', i see 'C:\Windows\py.exe'
So it doesn't look like i can use the VS Code terminal window to create a virtual environment for the target python version i am currently running in my workspace because it is not the python that is on the path in that terminal window. Does anyone know if this is the expected behavior?