skip to Main Content

enter image description here

I have no idea whats going on but I activated venv by using Scripts/activate and it doesnt working yet, the (venv) isnt appearing

please someone could help me? I tried everything I could find lol

2

Answers


  1. It looks like you are using Git Bash or a similar bash-like system for Windows. You need to run Scripts/activate.sh in this environment.

    For PowerShell, use Scripts/activate.ps1, and for cmd use Scripts/activate.bat.

    Login or Signup to reply.
  2. What terminal are you using? Please create a new powershell or cmd terminal. Also you should not open the folder of the virtual environment as a workspace. Below are the correct steps.

    1. Create a new folder as a workspace, then open this folder in vscode

    2. Create a new terminal using the following command to create a virtual environment

      python -m venv .venv
      
    3. Use the following command to activate the environment after creation

      .venvscriptsactivate
      
    4. Another way is to select the interpreter of the virtual environment in the Select Interpreter panel after creating the environment

      enter image description here

    5. And then the new terminal will automatically activate the environment

      enter image description here

    You can read creating-environments and venv.

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