As title stated I'm setting up pyenv to run python 3.8.5 on my account on my friend Mac. The issues I believe is coming from this command in my ~/.zshrc file
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval"$(pyenv init-)"\nfi' >>~/.zshrc
So far I have check the $PATH command to ensure nothing is wrong with that and export command but haven't been able to fix the issue. Also tried using the above command in bash shell with the ~/.bash_profile at the end still doesn't work. I'm unable to run brew bash or brew zsh due to ownership issues.
I'm following this guide to set it up if that help.
eval
and the double-quote, and also betweeninit
and the dash. There may be other problems, but those are the ones I see. Since this has been added incorrectly to those files, you'll need to edit them to fix the problem (just running the command again won't do it, it'll just add a correct version in addition to the incorrect version). – Cornstalkecho -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.zshrc
)? Can you check that your~/.zshrc
doesn't have that error from previous run of that erroneous command? And also be sure to restart your shell (e.g.exec "$SHELL"
) after all that! – Andesine~/.zshrc
or at leastgrep
few lines aroundeval
command from the same file, just to be sure? Output ofgrep -C 3 eval ~/.zshrc
should be enough I suppose... – Andesinecommand not found: eval
error :| Just curious, what happens when you runeval "$(pyenv init -)"
in your shell? – Andesinegrep eval ~/.zshrc | LC_ALL=C cat -v
– CornstalkM-BM-
" thing before "eval" is how it's displaying a non-breaking space character. You need to use an editor to delete the character right before "eval". – Cornstalkvi
should work. Just place the cursor on the character before "eval", and pressx
. BTW, it shouldn't matter, but I'd also recommend deleting the extra spaces inside the double-quotes, i.e." $(pyenv init-) "
->"$(pyenv init-)"
. – Cornstalk