commit 6179ac76c412d2e9a637b5ea8e7a7e47e4a48363 causes pyenv-virtualenv commands to fail with `pyenv: no installed versions match the prefix `-f'`
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-virtualenvplugin only. Please refrain from reporting issues of other plugins here.
- This repository is maintaining the
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)
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
Please upgrade Pyenv to 2.4.8
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
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.
Same here, pyenv update updates to version 2.3.23
I'm suffer from this issue. ㅜ ㅅ ㅜ. but, It's working ㅜ
today this was my personal cloudstrike.
I was in a situation where pyenv itself, via the
pyenv updatecommand, 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.
"this was my personal cloudstrike." 🤌 lmao