0

Just trying to follow this tutorial and I've crashed and burned 5 minutes in. I can't seem to get the green (venv) preface in Terminal to turn up - and when I call 'activate.ps1' I'm just getting a text file popping up.

I should be seeing this... enter image description here ...but no luck!

As you can tell from the tutorial I'm following, I'm a total Python newbie (though I have some decent c# experience). Any help is much appreciated!

py

2 Answers2

1

Just do this:

.\venv\Scripts\activate 

to activate the virtual environment

de_classified
  • 1,927
  • 1
  • 15
  • 19
  • 1
    And also, make sure you have made the virtual environment with python. Look at this link if you need help https://docs.python.org/3/library/venv.html – Brody Critchlow Feb 20 '20 at 23:55
  • Hey @FishingCode - Typing 'activate' gets me the (venv) preface in the terminal, but I'm still missing the ('venv' : venv) notification in the status bar of Visual Studio. Also - you wouldn't know how I could make the .ps1 file execute as a command? Thanks so much for your help so far! – Reverend Speed Feb 21 '20 at 18:01
  • @ReverendSpeed maybe check this [link](https://stackoverflow.com/questions/18713086/virtualenv-wont-activate-on-windows) .Talks about activate.ps1 and how to use it as an executable – de_classified Feb 21 '20 at 19:50
-1

I had the same issue today.

For Windows, it worked with:

.\venv\Scripts\activate 

And for Mac:

. venv/bin/activate

or

source venv/bin/activate
fistadev
  • 1
  • 3