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
CodePudding user response:
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
.
CodePudding user response:
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.
Create a new folder as a workspace, then open this folder in vscode
Create a new terminal using the following command to create a virtual environment
python -m venv .venv
Use the following command to activate the environment after creation
.venv\scripts\activate
Another way is to select the interpreter of the virtual environment in the Select Interpreter panel after creating the environment
And then the new terminal will automatically activate the environment
You can read creating-environments and venv.