Resolve Python Command Not Found in Zsh with Nano on Mac - VicPhanDevOps/mac GitHub Wiki

• The following resolution is for if you receive the command not found error when trying to call Python in the Zsh shell.
image

• Type nano ~/.zshrc and press the return key to open the .zshrc file in the Nano text editor.
image

• Press the down arrow until you are at the bottom of the file, type # Python alias and press the return key to comment the next line will be for the Python alias.
image

• Type alias python=python3 and press the return key to create an alias that calls Python3 three whenever you call python in the Terminal. Press the control and X keys to exit Nano.
image

• Press the Y key to save changes.
image

• Press the return key to save the file with the same name.
image

• Type zsh and press the return key to restart the Zsh shell.
image

• Type python and press the return key and you will launch the Python interactive shell this time around.
image

• Type quit() or exit() and press the return key to quit the Python interactive shell and return to the Zsh shell.
image

⚠️ **GitHub.com Fallback** ⚠️