pyenv-virtualenv icon indicating copy to clipboard operation
pyenv-virtualenv copied to clipboard

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

Open biblicabeebli opened this issue 1 year ago • 5 comments

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

Prerequisite

  • [ ] Make sure your problem is not listed in the common build problems.
  • [ ] Make sure no duplicated issue has already been reported in the pyenv-virtualenv issues. You should look in closed issues, too.
  • [ ] Make sure you are not asking us to help solving your specific issue.
    • GitHub issues is opened mainly for development purposes. If you want to ask someone to help solving your problem, go to some community site like Gitter, StackOverflow, etc.
  • [ ] Make sure your problem is not derived from packaging (e.g. Homebrew).
    • Please refer to the package documentation for the installation issues, etc.
  • [ ] Make sure your problem is not derived from other plugins.
    • This repository is maintaining the pyenv-virtualenv plugin only. Please refrain from reporting issues of other plugins here.

I have confirmed all of the above.

Description

  • [ ] Platform information - Ubuntu 24.04
  • [ ] OS architecture - amd64
  • [ ] pyenv version - 2aa2d17f0 ??
  • [ ] pyenv-virtualenv version: well it's commit 37917069ecba
  • [ ] Python version: any
  • [ ] virtualenv version (if installed): N/A
  • [ ] Please attach the debug log of a faulty Pyenv invocation as a gist - this output is too hard to sanitize because it encodes my home directory, which includes my name, with... strangely escaped characters when I run with it. And the output is just too huge. Please ask if you actually need it.

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)

biblicabeebli avatar Jul 29 '24 23:07 biblicabeebli

got the same problem on Manjaro:

  • Python 3.12.4
  • pyenv 2.4.7
  • pyenv-virtualenv 1:1.2.4-1 (via AUR)

Here it's the PYENV_DEBUG output: log.txt

gianlucapm avatar Jul 31 '24 09:07 gianlucapm

Please upgrade Pyenv to 2.4.8

native-api avatar Jul 31 '24 09:07 native-api

Please upgrade Pyenv to 2.4.8

  • pyenv 2.4.8

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

gianlucapm avatar Jul 31 '24 10:07 gianlucapm

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.

biblicabeebli avatar Aug 02 '24 03:08 biblicabeebli

Same here, pyenv update updates to version 2.3.23

zhuweiji avatar Aug 14 '24 03:08 zhuweiji

image

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

image

kyungjunleeme avatar Sep 10 '24 01:09 kyungjunleeme

today this was my personal cloudstrike.

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.

this was me! for a while i was in a state where...

Updating /home/agrimgt/.pyenv...
From https://github.com/pyenv/pyenv
 * branch              master     -> FETCH_HEAD
 ! [rejected]          v2.3.35    -> v2.3.35  (would clobber existing tag)```

was showing in my automated script but i didn't realize that it wasnt updating the rest of the tags and ignored it, until the error in the title of this post reared its head. had to manually go in with $ git -C .pyenv fetch --tags --force to unstick the tag, and pyenv updated smoothly again.

wizpig64 avatar Sep 26 '24 19:09 wizpig64

"this was my personal cloudstrike." 🤌 lmao

biblicabeebli avatar Sep 26 '24 22:09 biblicabeebli