Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to activate python virtual environment in VS code terminal?

Tags:

python-3.x

I have created a python virtual environment using VS code editor. a virtual environment is created successfully but I am not able to activate it.

enter image description here

when I am trying to activate my virtual env

enter image description here

I have also tried with "activate.bat"

enter image description here

like image 740
Sandeep Bhatt Avatar asked Dec 23 '22 22:12

Sandeep Bhatt


1 Answers

I was trying to activate virtual env command in PowerShell which is by default selected in VS Code, that why it was giving me an error.

we can select different terminal(PowerShell, Command Prompt, Git bash) in VS code. so I have just selected cmd(Command Prompt) and now it is working.

enter image description here

like image 146
Sandeep Bhatt Avatar answered Jun 06 '23 13:06

Sandeep Bhatt