How can I make a virtual environment work with pyenv?
Try this: into the terminal,
write:
nano ~/.bashrc
add in the end:
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
- Exit and save
- into the terminal write: source
~/.bashrc
And it's all, this worked for me.
Initialize pyenv
:
exec $SHELL
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
pyenv activate my-virtualenv
To save yourself some typing add this to your .bashrc
:
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"