# Python: command not found

**URL:** <https://discuss.python.org/t/python-command-not-found/22255>\
**Category:** Python Help\
**Created:** [December 28, 2022, 5:22pm UTC](https://discuss.python.org/t/python-command-not-found/22255 "2022-12-28T17:22:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rich123](https://avatars.discourse-cdn.com/v4/letter/r/7ea924/32.png) [@rich123](https://discuss.python.org/u/rich123)\
**Post date:** [December 28, 2022, 5:22pm UTC](https://discuss.python.org/t/python-command-not-found/22255/1 "2022-12-28T17:22:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Cupprum](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/cupprum/32/9514_2.png) [@Cupprum](https://discuss.python.org/u/Cupprum)\
**Post date:** [December 28, 2022, 6:49pm UTC](https://discuss.python.org/t/python-command-not-found/22255/2 "2022-12-28T18:49:44Z")

</div>

Hello,

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.

---

<div class="post-metadata">

**Author:** ![barry-scott](https://avatars.discourse-cdn.com/v4/letter/b/e9c0ed/32.png) [@barry-scott](https://discuss.python.org/u/barry-scott)\
**Post date:** [December 28, 2022, 6:50pm UTC](https://discuss.python.org/t/python-command-not-found/22255/3 "2022-12-28T18:50:35Z")

</div>

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):

```auto
/Users/barry/homebrew/bin/python3
/Users/barry/homebrew/bin/python3.10
/Users/barry/homebrew/bin/python3.11

```

Did you do `brew install python3`?  
If you install macOS kits from [python.org](http://python.org) 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:

```auto
/usr/local/bin/python3.10
/usr/local/bin/python3.11
/usr/local/bin/python3.12

```
