Home > Article > Development Tools > How to run python code with vscode
How does vscode run python code
Press Ctrl Shift B to run python code.
The premise is to configure taske.json
1. Press Ctrl Shift B and click
2 , click Create
3. Run external command
4. After creation, replace the content inside with (note The command should be changed to your own python installation path)
{ // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { "label": "python", "type": "shell", "command": "C:/Users/FSITQD/AppData/Local/Programs/Python/Python36-32/python", "args": [ "${file}" ], "group": { "kind": "build", "isDefault": true } } ] }
Then Ctrl Shift B will run.
Recommended related articles and tutorials: vscode tutorial
The above is the detailed content of How to run python code with vscode. For more information, please follow other related articles on the PHP Chinese website!