skip to Main Content

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.

2

Answers


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

    Login or Signup to reply.
  2. You can use shortcuts "Ctrl+Shift+P" and type "Python: Select Interpreter" to choose your python interpreter.

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