I tried update pyenv but I'm getting an error when trying to use pyenv-virtualenv:
Failed to activate virtualenv.
Perhaps pyenv-virtualenv has not been loaded into your shell properly.
Please restart current shell and try again.
I'm using zsh.
Steps to reproduce:
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/repo/prj
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init --path)"
fi
Restart shell and clone pyenv-virtualenv:
git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
Add pyenv-virtualenv config to ~/.zshrc:
eval "$(pyenv virtualenv-init -)"
Restart shell and install a Python version:
pyenv virtualenv 3.9.5 py3
Try to activate it:
When using pyenv 1.2.26, the problem does not occur (in that case, we must initialize pyenv using pyenv init - instead of pyenv init --path).
👍 React with 👍 10pgilad, christophelec, jbub, tiagosamaha, MakerRain and 5 more 😕 React with 😕 19ov7