I am trying to set the load path for Pyenv in my server .bashrc
file.
I am following this tutorial where it asks us to set pyenv
to the load path
However, in my .bashrc
file, I already see the below commands
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi
And how is it different from the below provided in the tutorial shared above?
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
May I know what does if...fi
block does in the code shown above?