Skip to content

Commit 4de2bf0

Browse files
committed
Fix pyenv-virtualenv using a different Python version in a conda environment
1 parent 28cd9be commit 4de2bf0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/pyenv-virtualenv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ STATUS=0
605605
mkdir -p "${PYENV_VIRTUALENV_CACHE_PATH}"
606606
cd "${PYENV_VIRTUALENV_CACHE_PATH}"
607607
if [ -n "${USE_CONDA}" ]; then
608-
pyenv-exec conda create $QUIET $VERBOSE --name "${VIRTUALENV_PATH##*/}" --yes "${VIRTUALENV_OPTIONS[@]}" python || STATUS="$?"
608+
pyenv-exec conda create $QUIET $VERBOSE --name "${VIRTUALENV_PATH##*/}" --yes "${VIRTUALENV_OPTIONS[@]}" --file <(pyenv-exec conda list python --full-name --export) || STATUS="$?"
609609
else
610610
if [ -n "${USE_M_VENV}" ]; then
611611
pyenv-exec "${M_VENV_PYTHON_BIN:-python}" -m venv $QUIET $VERBOSE "${VIRTUALENV_OPTIONS[@]}" "${VIRTUALENV_PATH}" || STATUS="$?"

0 commit comments

Comments
 (0)