[英]Configure task using python in visual studio code for windows 10
I'm using vs code 2.0 with python 3.6 and want to configure a task to run he the current python file. 我正在将vs code 2.0与python 3.6配合使用,并希望配置一个任务以运行当前的python文件。 The
tasks.json
file has the below lines tasks.json
文件具有以下tasks.json
行
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"taskName": "echo",
"type": "shell",
"command": "echo Hello"
}
]
}
How to fill the lines to fit my needs. 如何满足我的需求。 I tried many solutions with no avail, especially the one here Configure Vs code version 2.0.0 Build Task for python it shows the below error
我尝试了许多无济于事的解决方案,尤其是这里的配置VS代码版本2.0.0的python生成任务,它显示以下错误
> Executing task: python d:\books\programming Languages\python\Projects\.vscode\tasks.json <
C:\Users\[myuser]\Anaconda3\python.exe: can't open file 'd:\books\programming': [Errno 2] No such file or directory
The terminal process terminated with exit code: 1
Please help in steps because I'm very new to python. 请逐步提供帮助,因为我是python的新手。
Minimum configuration: 最低配置:
{
"version": "2.0.0",
"command": "python",
"args":["${file}"]
}
Optimal configuration you can find here: 您可以在此处找到最佳配置:
Configure Vs code version 2.0.0 Build Task for python 为python配置Vs代码版本2.0.0生成任务
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.