Last active
March 31, 2024 21:19
-
-
Save microft/36e45f5d6020f841a20304045fc9c1f6 to your computer and use it in GitHub Desktop.
zsh functions to create and use python 3 virtualenvs based on the directory name
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
WORKON_HOME=/home/microft/.virtualenvs | |
workon(){ | |
cd $1; | |
source $WORKON_HOME/${PWD##*/}/bin/activate | |
return 0; | |
} | |
mkvenv(){ | |
python3 -m venv $WORKON_HOME/$1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment