0

I am currently trying to set up a virtualenv for python in VSCode. I never did that before so I tried to follow along some tutorials. The only problem I have is that I cant seem to get the virtualenv activated through my VSCode terminal, but it works with Command Prompt.

This is what I get in VSCode: VSCode Terminal

And this is what I get in Command Prompt: Command Prompt

Is there anything I should add for the VSCode terminal or am I confusing two different things right here? Thank you!

3
  • 1
    The VSCode terminal is a Powershell terminal not Command Prompt, so you'll need to use Scripts\Activate.ps1 instead of Scripts\activate.bat as mentioned at virtualenv in PowerShell?
    – shriakhilc
    Apr 2, 2022 at 18:50
  • 1
    Or you could change VSCode settings to use CMD too How do I change my vs code terminal to cmd.exe
    – shriakhilc
    Apr 2, 2022 at 18:53
  • @shriakhilc Thank you. It worked, but I also needed to change my ExecutionPolicy for LocalMachine that was on Restricted. I didnt try changing the terminal, but I will keep the option in mind if I need it in the future. Thank you for the help! Apr 2, 2022 at 19:34

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy