Create Python Alias for Python 3 in Zsh with Nano on Mac - DevPops-Inc/mac GitHub Wiki
• Type nano ~/.zshrc and press the return key to open the .zshrc file in the Nano text editor.
•

• 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.
•

• Type alias python=python 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.
•

• Press the Y key to save changes.
•

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

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

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

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