I am trying to activate a virtual environment using venvscriptsactivate
on Windows 10 but I keep on getting an error The system cannot find the path specified.
What am I doing wrong? The error comes when I try to activate the venv after navigating to its directory using cd venv
.
I tried navigating to the venv
directory and ran scriptsactivate
but I get an error The system cannot find the path specified.
2
Answers
First create a virtual environment:
then activate the VM:
In vscode, you can use interface-based operations to create and activate a virtual environment.
Ctrl+Shift+P
–>Python: Create Environment, read here for details.You can also create and activate a virtual environment using the command line.
In addition, select the virtual environment in the Select Interpreter panel, and then create a new terminal to automatically activate the virtual environment.