"command not found: python" each time I open the Terminal

Question:

I’m on an M1 Mac. Each time I enter a python command in Terminal, I get "command not found: python".

To fix this, I can enter eval "$(pyenv init --path)".

How can I use Python without having to first run the eval line above each time I open the Terminal?

Asked By: RanLearns

||

Answers:

Add eval "$(pyenv init --path)" to ~/.zshrc

Answered By: tokentarts

Add eval "$(pyenv init --path)" to ~/.zshrc – here’s how to do this in the Terminal:

eval "$(pyenv init --path)" >> ~/.zshrc
Answered By: RanLearns
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.