Skip to content

Instantly share code, notes, and snippets.

@neerajadsul
Created April 9, 2024 15:45
Show Gist options
  • Save neerajadsul/5fa6a91c2fbcb04cbc4eaf8a8cfa9a11 to your computer and use it in GitHub Desktop.
Save neerajadsul/5fa6a91c2fbcb04cbc4eaf8a8cfa9a11 to your computer and use it in GitHub Desktop.
Activate Python Virtual Environment from A Directory
# Put this in your .bashrc or .zshrc
# You can change the directory `virtualenvs` to whichever you prefer.
activate() {
source ~/.virtualenvs/"$1"/bin/activate
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment