I am using virtualenv in vscode and I'd like to have a task to build the documentation using sphinx-build
.
My tasks.json contains
"tasks": [
{
"label": "Build Docs",
"type": "shell",
"command": "sphinx-build",
"args": ["./sphinx", "./docs/sphinx_build"],
"options": {
"cwd": "${workspaceFolder}"
}
}
However, when I run this it seems that vscode is not using the Scripts
folder of my virtual environment, so I get
sphinx-build : The term 'sphinx-build' is not recognized as the name of a cmdlet, function, script file, or operable program.
The same command runs just fine in the terminal. Am I missing something here? Is there a way to correctly point the task to the correct location in a virtual environment?