pyenv / pyenv-virtualenv

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

Not compatible with `pyenv>=1.x` #402

Closed muppetjones closed 3 years ago

muppetjones commented 3 years ago

Just had a headache of a time figuring out why pyenv activate ... was not actually activating a venv. Completely forgot that I'd updated pyenv a bit ago.

Solution

cd $(pyenv root)
git checkout 1.2.27

This project seems largely abandoned, so mainly leaving this here more as a note.

PierreRust commented 3 years ago

I had the same issue, thanks for your note !

actually adding the following to my config.fish solved it, as mentioned in #401 :

pyenv init --path | source

That's for fish but for zsh and bash the workaround should be similar. This additional line was not necessary when using pyenv <2 and is not mentioned in the documentation,

native-api commented 3 years ago

Please see updated and hopefully clearer Pyenv shell setup instructions in https://github.com/pyenv/pyenv#readme eval "$(pyenv virtualenv-init -)" should run in an rc file after eval "$(pyenv init -)" as before.

PierreRust commented 3 years ago

Works for me (that's exactly what I already had since stumbling on this), looks good !