How to Fix ""zsh: command not found: python" Error on MacOS X?
If you are receiving a "zsh: command not found: python" error on MacOS X, it means that the system cannot locate the Python installation.
Here are the steps you can follow to fix this error:
- Install Python using Homebrew:
brew install python
- If you already have Python installed, try updating it using Homebrew:
brew upgrade python
- Check if Python is installed properly by running the following command:
- If the above command gives an error, add the following line to your
You can edit the
.zshrc file using the following command:
Save the changes and exit the file.
Run the following command to activate the changes:
- Verify that Python is working by running the following command:
You should not receive the "zsh: command not found: python" error anymore.