Here in cmd show this older version
enter image description here
but, IDLE shows this version (which i again installed)
enter image description here
because of this VsCode uses older verison of Python instead of Current version
enter image description here
i tried setting path, but it still shows the older verison of python, uninstalled and installed it too.
in setting, Current version of is interpreter selected ,then also it runs program on older version
enter image description here
if by mistake there is two version of python, how do i get rid of older version of Python
i just want to use newer version of python
Edit:
it works, when i "Run Python File",(on current version), Any way to set this as default?
but, when i "Run Code" (ctrl + shift + N), it opens new terminal and runs that code in older version of python
i didn’t installed two versions ,it was just as possibility .
but, there was python 10.12 present in Bin folder of MSYS2 .
2
Answers
i found the answer, thanks to Mr. Terry Jan Reedy
If you have chosen the Python3.11 as VSCode Python Interpreter, you can use shortcuts Ctrl+Shift+` or VSCode command Terminal: Create New Terminal to open a new terminal. Another way is delete the current terminal, and click the button "Run Python File" to run any python file.
Vscode will automatically activate the one you have selected.