macOS path_helper runs after .zshenv and can move system Python ahead of pyenv. Add an idempotent login hook and preserve it across later easyzsh migrations.
9 lines
379 B
Bash
9 lines
379 B
Bash
# pyenv (Python Version Manager), always-on via ~/.zshenv
|
|
export PYENV_ROOT="${PYENV_ROOT:-$HOME/.pyenv}"
|
|
[[ -d "$PYENV_ROOT/bin" ]] && path=("$PYENV_ROOT/bin" ${path:#$PYENV_ROOT/bin})
|
|
[[ -d "$PYENV_ROOT/shims" ]] && path=("$PYENV_ROOT/shims" ${path:#$PYENV_ROOT/shims})
|
|
export PATH
|
|
if [[ -o interactive ]] && command -v pyenv &> /dev/null; then
|
|
eval "$(pyenv init - zsh)"
|
|
fi
|