skip to Main Content

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


  1. First create a virtual environment:

    py -m venv env
    

    then activate the VM:

    envscriptsactivate
    
    Login or Signup to reply.
  2. 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.

    enter image description here

    You can also create and activate a virtual environment using the command line.

    enter image description here

    In addition, select the virtual environment in the Select Interpreter panel, and then create a new terminal to automatically activate the virtual environment.

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search