How to Resolve. Zshenv. Command Not Found Pyenv?
I Have Pyenv Installed and My. Zshenv Looks Like the Following: Export Pyenv_Root="$Home"/. Pyenv Export Path="$Pyenv_Root"/Bin:"$Path" If Command -v Pyenv...
I have pyenv installed and my .zshenv looks like the following :
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
eval "$(pyenv virtualenv-init -)"
When I open a new terminal it gives me the following error:
.zshenv. command not found: : pyenv
1 Answer
The fix in the github issue link didn't work for me.
The problem was that pyenv wasn't on the path at the time of running pyenv init.
I add export PATH=/usr/local/bin:"$PATH" to my .zshenv before calling pyenv init.