Home > front end >  Why vscode terminal show python version difference with interpreter?
Why vscode terminal show python version difference with interpreter?

Time:05-31

as you see "python --version show python3.10.4

but the interpreter show python 3.7.3

enter image description here

how can i change the envirnment in vscode

CodePudding user response:

If you click on the interpreter version being used by VSCode, you should be able to select different versions across your device.

Interpreter version

CodePudding user response:

Selecting the interpreter in VSCode:

https://code.visualstudio.com/docs/python/environments#_work-with-python-interpreters

To run streamlit in vscode: Open the launch.json file of your project. Copy the following:

{
    "configurations": [
        

        {
            "name": "Python:Streamlit",
            "type": "python",
            "request": "launch",
            "module": "streamlit",
            
            "args": [
                
                "run",
                "${file}"
            ]
        }
     ]
}

  • Related