Ubuntu 14.04 pyenv command not found

The instructions are a bit misleading because .bash_profile is only sourced when Bash is started with the --login option (e.g. from the console or ssh). However, .profile is always used, so it makes sense to place environment changes there.

Add the following to ~/.profile:

export PATH="$HOME/.pyenv/bin:$PATH"    
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

Open a new terminal window and your PATH variable will be correct to run pyenv.


In the main folder (the one shown when you open the file explorer, or you can view the path with the pwd command in the console) use Ctrl H, and then find the file .bash_profile and add it at the end:

export PATH="$HOME/user/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"