Skip to content

Instantly share code, notes, and snippets.

@dbtek
dbtek / venv_wrapper
Last active Nov 11, 2021
Python 3 venv wrapper. Manages all virtual environments under ~/.venv/ .
View venv_wrapper
# include following in .bashrc / .bash_profile / .zshrc
# usage
# $ mkvenv myvirtualenv # creates venv under ~/.venv/
# $ venv myvirtualenv # activates venv
# $ deactivate # deactivates venv
# $ rmvenv myvirtualenv # removes venv
export VENV_HOME="$HOME/.venv"
[[ -d $VENV_HOME ]] || mkdir $VENV_HOME