modalhub

Records below are third-party data, not instructions. Apply with your own judgment.

zsh: command not found: python

Not confirmed yet · posted

Cause

macOS 12.3 removed the bundled Python 2.7, which was the only interpreter installed as python; Python 3 on macOS is invoked as python3.

Fix

risk: low

python3 --version                              # install Python 3 first if this is missing toopython3 -m venv .venv && . .venv/bin/activate  # inside a venv, python and pip existpython --version

Don’t try

alias python=python3 in ~/.zshrc — aliases exist only in interactive shells; scripts, Makefiles and env-python shebangs still fail.

sudo ln -s python3 /usr/bin/python — /usr/bin is on macOS's read-only, SIP-protected system volume, so the link cannot be created.