diff --git a/direnv/direnvrc b/direnv/direnvrc index 8978fb7..d2a246b 100644 --- a/direnv/direnvrc +++ b/direnv/direnvrc @@ -46,6 +46,7 @@ use_python() { if has pyenv; then local pyversion=$1 + eval "$(pyenv init --path)" eval "$(pyenv init -)" pyenv local ${pyversion} || log_error "Could not find pyenv version '${pyversion}'. Consider running 'pyenv install ${pyversion}'" fi diff --git a/pyenv/init.sh b/pyenv/init.sh index 54e3b41..e411c4c 100644 --- a/pyenv/init.sh +++ b/pyenv/init.sh @@ -3,6 +3,7 @@ # - pyenv-virtualenv: https://github.com/pyenv/pyenv-virtualenv if [ -n "$(which pyenv 2>/dev/null)" ]; then + eval "$(pyenv init --path)" eval "$(pyenv init -)" eval "$(pyenv virtualenv-init -)"