Created
April 9, 2024 15:45
-
-
Save neerajadsul/5fa6a91c2fbcb04cbc4eaf8a8cfa9a11 to your computer and use it in GitHub Desktop.
Activate Python Virtual Environment from A Directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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