虚拟环境中的vscode sphinx-build任务

时间:2019-11-28 14:41:55

标签: python visual-studio-code virtualenv python-sphinx

我在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.

同一命令在终端中运行正常。 我在这里想念什么吗?有没有办法将任务正确地指向虚拟环境中的正确位置?

0 个答案:

没有答案