skip to Main Content

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 .
i don't have any idea, of that python in bin folder

2

Answers


  1. Chosen as BEST ANSWER

    i found the answer, thanks to Mr. Terry Jan Reedy i just deleted these python files and now Vscode runs program on Newer version of Python


  2. 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.

    enter image description here

    Vscode will automatically activate the one you have selected.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search