diff --git a/modules/python/init.zsh b/modules/python/init.zsh index da78ea79..662c905d 100644 --- a/modules/python/init.zsh +++ b/modules/python/init.zsh @@ -37,12 +37,12 @@ fi # Load virtualenvwrapper into the shell session. if (( $+commands[virtualenvwrapper.sh] )); then # Set the directory where virtual environments are stored. - export WORKON_HOME="$HOME/.virtualenvs" + [[ -n $WORKON_HOME ]] || export WORKON_HOME="$HOME/.virtualenvs" # Disable the virtualenv prompt. VIRTUAL_ENV_DISABLE_PROMPT=1 - source "$commands[virtualenvwrapper.sh]" + pyenv virtualenvwrapper 2>/dev/null || source "$commands[virtualenvwrapper.sh]" fi #