[Python] Failed to create virtualenv with pyenv virtualenv

Discussão em 'Python' iniciado por Stack, Julho 2, 2025.

  1. Stack

    Stack Membro Participativo

    Ok, I looked through a lot of posts and still have not yet found a solution to this issue.

    I want to use pyenv's virtualenv for multiple python versions management, and I keep getting this error when I try to create it:

    $ pyenv virtualenv 3.11.9 pyvenv
    pyenv: no installed versions match the prefix `-f'


    I also tried with the actual paths:

    $ "$PYENV_ROOT/plugins/pyenv-virtualenv/bin/pyenv-virtualenv" "$PYENV_ROOT/versions/3.11.9/bin/python" pyenv
    /proj/user/.pyenv/plugins/pyenv-virtualenv/bin/pyenv-virtualenv: line 354: python-build: command not found
    pyenv-virtualenv: `/proj/user/.pyenv/versions/3.11.9/bin/python' is not installed in pyenv.
    It does not look like a valid Python version. See `pyenv install --list' for available versions.


    I checked the paths, .bashrc, and many other places and could not find out where the issues come from, and all the require tools that are showing in the error actual exist.

    Now I am clueless and hoping to get some help here. Thanks.

    Continue reading...

Compartilhe esta Página