Celaro Celaro -4 years ago 235
Python Question

Python 3 on visual studio code

So I have been looking online trying to find how can I compile my python program using python 3 on visual studio code. However, it seems that they are not much information out there regarding how to do it. Below is what my task.json file looks like. Is there something I am doing?

// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "Python",
"isShellCommand": true,
"args": ["${file}"],
"showOutput": "always"

Any advise will be great thank you

Answer Source

In VSCode, you need to specify the Workspace that you intend to use to run using particular Python version.

Press "Ctrl+Shift+P" and type "Interpreter" and select "Python: Select Workspace Interpreter" Selecting Python Interpreter

This will list the different versions installed on your machine. Select what you want.

Select the Python version

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download