Skip to content

Instantly share code, notes, and snippets.

@oliverlabs
Created September 26, 2023 09:09
Show Gist options
  • Save oliverlabs/8637dbc8e74a72f77fa03cb87a5a87e3 to your computer and use it in GitHub Desktop.
Save oliverlabs/8637dbc8e74a72f77fa03cb87a5a87e3 to your computer and use it in GitHub Desktop.
PowerShell Functions to activate and deactivate a Python virtual environment
## Activate a Python Virtual Environment
Function vea {
Get-ChildItem activate.ps1 -Recurse -Depth 2 | % { $_.FullName } | Invoke-Expression
}
## Deactivate a Python Virtual Environment
Function ved {
Invoke-Expression "deactivate -nondestructive"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment