Home > Development Tools > VSCode > body text

How to run python code with vscode

angryTom
Release: 2020-02-10 17:40:26
Original
9681 people have browsed it

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

How to run python code with vscode

2 , click Create

How to run python code with vscode

3. Run external command

How to run python code with vscode

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
            }
        }
    ]
}
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template