我正在使用vs code 2.0和python 3.6,并希望配置一个任务来运行当前的python文件。 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"
}
]
}
如何填充线条以满足我的需求。我尝试了许多无效的解决方案,尤其是这里的Configure Vs code version 2.0.0 Build Task for 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
请帮忙,因为我对python很新。
答案 0 :(得分:0)
最低配置:
{
"version": "2.0.0",
"command": "python",
"args":["${file}"]
}
您可以在此处找到最佳配置: