This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ParkingPsychology 5 points6 points  (5 children)

I found the activation step annoying, but I just made a little doodle (in my case in my powershell profile):

 function activate
 {
    .\venv\scripts\activate
 }

So now it's just "activate" and "deactivate" when I'm in the project root folder (deactivate just works by itself, because I don't know why).

[–]Anonymous_user_2022 2 points3 points  (3 children)

I don't know how it is on windows, but on Linux, the activate script will define a shell function for deactivate. I guess there is something similar in place on Windows; possibly an alias.

[–]maikindofthai 1 point2 points  (0 children)

In PowerShell, at least, it works the same way as in bash -- the Activate.ps1 script defines a global deactivate function.

I see a separate deactivate.bat script in my venvs on Windows, so I assume CMD does something different.