Home > Software engineering >  How to switch to new compiler in vscode
How to switch to new compiler in vscode

Time:12-19

I was using Python 3.9 for long. But I got some problem and I decide to install Python 3.11 for coding, but vscode still in Python 3.9.

I don't know how to change the compiler to Python 3.11 (I added it into Path). So how can I do that? Thanks.

CodePudding user response:

you can specify to VS Code the version of python to use with the interpreter

In settings.json (Here a virtual environment):

"python.defaultInterpreterPath": "${workspaceRoot}/venv/"

Or at the bottom left of VS Code, you can select the version of python that is installed.

CodePudding user response:

You can use shortcuts "Ctrl Shift P" and type "Python: Select Interpreter" to choose your python interpreter.

  • Related