我在vscode中使用virtualenv,我想承担一个使用sphinx-build
构建文档的任务。
我的task.json包含
"tasks": [
{
"label": "Build Docs",
"type": "shell",
"command": "sphinx-build",
"args": ["./sphinx", "./docs/sphinx_build"],
"options": {
"cwd": "${workspaceFolder}"
}
}
但是,当我运行此代码时,vscode似乎没有使用我的虚拟环境的Scripts
文件夹,所以我得到了
sphinx-build : The term 'sphinx-build' is not recognized as the name of a cmdlet, function, script file, or operable program.
同一命令在终端中运行正常。 我在这里想念什么吗?有没有办法将任务正确地指向虚拟环境中的正确位置?