pyenv / pyenv-virtualenv

a pyenv plugin to manage virtualenv (a.k.a. python-virtualenv)
MIT License
6.26k stars 399 forks source link

commit 6179ac76c412d2e9a637b5ea8e7a7e47e4a48363 causes pyenv-virtualenv commands to fail with `pyenv: no installed versions match the prefix `-f'` #488

Closed biblicabeebli closed 3 days ago

biblicabeebli commented 1 month ago

Too many issues will kill our team's development velocity, drastically. Make sure you have checked all steps below.

Prerequisite

I have confirmed all of the above.

Description

This diff includes the probable culprit:

$ git diff cf45718a1b0e86d7a53c8d03d11151306a080ec7 6179ac76c412d2e9a637b5ea8e7a7e47e4a48363 bin/pyenv-virtualenv
*** cutting out the rest of the diff ***

 if [[ -n "${VERSION_NAME}" ]] && command -v pyenv-latest >/dev/null; then
-  VERSION_NAME="$(pyenv-latest -q "${VERSION_NAME}" || echo "${VERSION_NAME}")"
+  VERSION_NAME="$(pyenv-latest -f "${VERSION_NAME}")"
 fi

To reproduce (I've cut out git warnings):

(global):~…/plugins/pyenv-virtualenv (master)$ git checkout 6179ac76c412d2e9a637b5ea8e7a7e47e4a48363
(global):~…/plugins/pyenv-virtualenv ((HEAD detached at 6179ac7))$ pyenv virtualenv 3.12.1 evdev8
pyenv: no installed versions match the prefix `-f'

# environment not created

(global):~…/plugins/pyenv-virtualenv ((HEAD detached at 6179ac7))$ git checkout cf45718a1b0e86d7a53c8d03d11151306a080ec7
(global):~…/plugins/pyenv-virtualenv ((HEAD detached at cf45718))$ pyenv virtualenv 3.12.1 evdev8

# environment created

(my shell prompt says what the current branch of the repo is)

gianlucapm commented 1 month ago

got the same problem on Manjaro:

Here it's the PYENV_DEBUG output: log.txt

native-api commented 1 month ago

Please upgrade Pyenv to 2.4.8

gianlucapm commented 1 month ago

Please upgrade Pyenv to 2.4.8

Upgrading from 2.4.7 to 2.4.8 solved the issue, thanks for the support

biblicabeebli commented 1 month ago

I was in a situation where pyenv itself, via the pyenv update command, would pull its git updates and update successfully... to version 2.3.34.

Baffling.

I went ahead and reinstalled pyenv and now it's all worky again.

Y'all can close.

zhuweiji commented 1 month ago

Same here, pyenv update updates to version 2.3.23

kyungjunleeme commented 3 days ago
image

I'm suffer from this issue. ㅜ ㅅ ㅜ. but, It's working ㅜ

image