diff --git a/libexec/pyenv-prefix b/libexec/pyenv-prefix index 1ee317bb..80c033a8 100755 --- a/libexec/pyenv-prefix +++ b/libexec/pyenv-prefix @@ -26,7 +26,7 @@ fi PYENV_PREFIX_PATHS=() for version in "${versions[@]}"; do if [ "$version" = "system" ]; then - PYTHON_PATH="$(pyenv-which python || true)" + PYTHON_PATH="$(PYENV_VERSION="${version}" pyenv-which python || true)" PYENV_PREFIX_PATH="${PYTHON_PATH%/*}" else PYENV_PREFIX_PATH="${PYENV_ROOT}/versions/${version}"