Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Virtual Environment Setup in Visual Studio Code -- Workon command

I am trying to activate the Python virtual environment using workon command in Visual Studio Code. Typing command workon is listing all the virtual environments already available, but when I am typing the command workon env-name to activate the environment, nothing is happing and I am also not getting any errors. Can someone help me with this problem?

like image 359
DumbCoder Avatar asked Nov 28 '25 03:11

DumbCoder


1 Answers

If you have already created an environment outside the Visual Studio (via command promote) and trying to activate it from MS Visual Studio then most common cause is Powershell:

  1. Check the terminal window and check the command type we are using, by default it will be Powersheel,
  2. Change it to cmd and try again the command.
  3. May be it will work for you, I have got success after correcting it. Thanks.
like image 76
ruakh Avatar answered Nov 30 '25 18:11

ruakh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!