vscode运行python文件

Ctrl +Shift+B 运行python

得配置taske.json

taske.json在哪,按下Ctrl +Shift+B

点击

点击

点击 就有taske.json啦

然后替换里面的内容为

{
    // 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
            }
        }
    ]
}

然后Ctrl +Shift+B就运行啦

猜你喜欢

转载自blog.csdn.net/weixin_38095708/article/details/81198071