Python: command not found

Hi I’m very new to Python and I’m trying to get it set up with VSC, however I keep getting the following error whenever I try to run any commands:

/bin/sh: python: command not found

I’ve googled and tried solutions such as installing homebrew, but to no avail.

If anyone could help me out I’d really appreciate it.

edit: forgot to mention, I’m using a 2015 mac


my first guess would be, that you should specify the correct Python interpreter. MacOS comes with preinstalled version of python3.
In order to specify your interpreter, press command + shift + p and in the prompt write select interpreter. This will print out (some) locations of python3 versions present on your system.
The other way to select an interpreter is in bottom right corner of VS Code.

macOS has a /usr/bin/python3 command, but no python command.
Try python3.

If you install python3 from homebrew then it install like this (at least on Apple Silicon Mac):


Did you do brew install python3?
If you install macOS kits from then you the default installer will
edit your ~/.zprofile to add python to your PATH.

It also installs into /usr/local/bin for example I have these installed: