pyenv / pyenv-virtualenv

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

Cannot create virtualenv: "pyenv: no installed versions match the prefix -f'`" #487

Closed HarshNarayanJha closed 4 months ago

HarshNarayanJha commented 4 months ago

Prerequisite

Description

Running pyenv virtualenv env or pyenv virtualenv 3.12.4 env gives a error pyenv: no installed versions match the prefix-f'`

https://gist.github.com/HarshNarayanJha/e7fcf4e548de0c69708c6cc1bd2b9e3e

native-api commented 4 months ago

Upgrade Pyenv to 2.4.8. There was a change in an internal command's interface in 2.4.8 that Pyenv-Virtualenv 1.2.4 reflects.

HarshNarayanJha commented 4 months ago

It is saying already up to date?

Updating /home/harshnj/.pyenv/plugins/pyenv-doctor...
From https://github.com/pyenv/pyenv-doctor
* branch            master     -> FETCH_HEAD
Already up to date.
Updating /home/harshnj/.pyenv/plugins/pyenv-pip-migrate...
From https://github.com/pyenv/pyenv-pip-migrate
* branch            master     -> FETCH_HEAD
Already up to date.
Updating /home/harshnj/.pyenv/plugins/pyenv-pip-update...
From https://github.com/massongit/pyenv-pip-update
* branch            master     -> FETCH_HEAD
Already up to date.
Updating /home/harshnj/.pyenv/plugins/pyenv-update...
From https://github.com/pyenv/pyenv-update
* branch            master     -> FETCH_HEAD
Already up to date.
Updating /home/harshnj/.pyenv/plugins/pyenv-virtualenv...
From https://github.com/pyenv/pyenv-virtualenv
* branch            master     -> FETCH_HEAD
Already up to date.
native-api commented 4 months ago

It is saying already up to date?

I don't see Pyenv itself in the list. It's probably installed somewhere else.

HarshNarayanJha commented 4 months ago

Right, not updated in arch repos yet (2 days?)

EDIT: Now it's showing 2.4.8 on arch, but I haven't received the update yet

native-api commented 4 months ago

In the meantime, you can downgrade to v1.2.3 or to https://github.com/pyenv/pyenv-virtualenv/commit/cf45718a1b0e86d7a53c8d03d11151306a080ec7

cd ~/.pyenv/plugins/pyenv-virtualenv
git checkout <commit>
HarshNarayanJha commented 4 months ago

Checkout works right now. Probably package will update soon

Strange, it now shows latest version online, but hasn't reached my system yet.

Closing

HarshNarayanJha commented 4 months ago

Update arrived