I had this line eval "$(pyenv virtualenv-init -)" in my .zshrc, and ran source .zshrc and received the above error.
Am I missing anything?
The pyenv-virtualenv with pyenv virtualenv-init has not released yet. Please use latest master of pyenv-virtualenv.
Ok I see, I installed it using brew. Anyway I can access the latest build using brew?
brew install --HEAD pyenv-virtualenv might help.
Thanks.
brew upgrade --HEAD pyenv-virtualenv works for me.
I'm new to pyenv, pyenv-virtualenv, etc. In fact I've started learning or testing them only today. I ran into this same problem, initially I got it working by checking out the plugin from Git. Then I looked up here in "Closed" issues and found this post. I got it working also in this way. Nice, thanks! Anyway, currently the "HEAD" README.md instructions concerning OS X and Brew do not work out of box.
On debian I have this same issue :( Any ideas? Using latest :) Added to /etc/profile.d/pyenv.sh the required lines, pyenv loads but throws this error.
@gaborbernat instead of setting it at system wide level /etc/profile.d/pyenv.sh, have you try setting it under ~/.bashrc or ~/.zshrc if you're using zsh.
Need this for all users, so cannot do that :)
Try this:
git clone https://github.com/yyuu/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv
I solved this same problem through rebooting the command line.
@suzaku 2019 sents you the love man, wtf, i just didnt have the plugins directory slipped in the path, wtf
+1 for this. Running exec "$SHELL" was giving me the error pyenv: no such command 'virtualenv-init'. Once I went into the .pyenv folder and moved the pyenv-virtualenv directory inside .pyenv/plugins it worked.
@suzaku, your solution works for me! 馃憤
Most helpful comment
Try this:
git clone https://github.com/yyuu/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv