# VSCode terminal problem $python3 app.py - zsh: command not found: app.py

**URL:** <https://forum.codewithmosh.com/t/vscode-terminal-problem-python3-app-py-zsh-command-not-found-app-py/1810>\
**Category:** Python\
**Created:** [January 9, 2021, 9:11pm UTC](https://forum.codewithmosh.com/t/vscode-terminal-problem-python3-app-py-zsh-command-not-found-app-py/1810 "2021-01-09T21:11:35Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![eylemsutcu](https://avatars.discourse-cdn.com/v4/letter/e/b9bd4f/32.png) [@eylemsutcu](https://forum.codewithmosh.com/u/eylemsutcu)\
**Post date:** [January 9, 2021, 9:11pm UTC](https://forum.codewithmosh.com/t/vscode-terminal-problem-python3-app-py-zsh-command-not-found-app-py/1810/1 "2021-01-09T21:11:35Z")

</div>

Hello,  
I was learning Python on Pycharm but I switched to VSCode for this course. Unfortunately, I can not use my VSCode Terminal. I installed Python 3.9 properly and then installed VSCode. I am able to use VSCode output window with code runner but I cannot use my terminal window so I can’t get any input since code runner lets read only.  
I am on MacOS 10.15.7 Catalina.  
Here is my problem:  
$python3 app.py  
zsh: command not found: app.py

![image](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/1X/cb907b40f40cfc75359feb1c8bc953e38f3d8ebb.png)

---

<div class="post-metadata">

**Author:** ![SAM](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/sam/32/167_2.png) [@SAM](https://forum.codewithmosh.com/u/SAM)\
**Post date:** [January 10, 2021, 8:48am UTC](https://forum.codewithmosh.com/t/vscode-terminal-problem-python3-app-py-zsh-command-not-found-app-py/1810/2 "2021-01-10T08:48:48Z")

</div>

Did you type the “$”? It’s part of the standard prompt and nothing you type.

---

<div class="post-metadata">

**Author:** ![Nicoboy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/nicoboy/32/592_2.png) [@Nicoboy](https://forum.codewithmosh.com/u/Nicoboy)\
**Post date:** [January 10, 2021, 9:01am UTC](https://forum.codewithmosh.com/t/vscode-terminal-problem-python3-app-py-zsh-command-not-found-app-py/1810/3 "2021-01-10T09:01:14Z")

</div>

OMG, I have the same issue too. I am so confused.

 ![Screen Shot 2021-01-10 at 00.59.57](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/1X/b783bc2e398f1dfc17387ace39897f80cc12d416.png)

---

<div class="post-metadata">

**Author:** ![SAM](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/sam/32/167_2.png) [@SAM](https://forum.codewithmosh.com/u/SAM)\
**Post date:** [January 10, 2021, 10:04am UTC](https://forum.codewithmosh.com/t/vscode-terminal-problem-python3-app-py-zsh-command-not-found-app-py/1810/4 "2021-01-10T10:04:28Z")

</div>

Don’t type the “`$`”!

---

<div class="post-metadata">

**Author:** ![Nicoboy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/nicoboy/32/592_2.png) [@Nicoboy](https://forum.codewithmosh.com/u/Nicoboy)\
**Post date:** [January 10, 2021, 10:17am UTC](https://forum.codewithmosh.com/t/vscode-terminal-problem-python3-app-py-zsh-command-not-found-app-py/1810/5 "2021-01-10T10:17:08Z")

</div>

It works! But why Mosh has the “$” when he didnt type it?

If I didnt type one, my terminal won’t have the “$” sign.

---

<div class="post-metadata">

**Author:** ![SAM](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/sam/32/167_2.png) [@SAM](https://forum.codewithmosh.com/u/SAM)\
**Post date:** [January 10, 2021, 11:29am UTC](https://forum.codewithmosh.com/t/vscode-terminal-problem-python3-app-py-zsh-command-not-found-app-py/1810/6 "2021-01-10T11:29:20Z")

</div>

> [@Nicoboy](#):
>
> If I didnt type one, my terminal won’t have the “$” sign.

It’s part of the prompt. And it’s part of your prompt, too!  
 ![prompt](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/1X/fb4b14a6b50b8aebddced2dda0bf048980760aa3.png)

---

<div class="post-metadata">

**Author:** ![Nicoboy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/nicoboy/32/592_2.png) [@Nicoboy](https://forum.codewithmosh.com/u/Nicoboy)\
**Post date:** [January 10, 2021, 6:47pm UTC](https://forum.codewithmosh.com/t/vscode-terminal-problem-python3-app-py-zsh-command-not-found-app-py/1810/7 "2021-01-10T18:47:27Z")

</div>

Awwwww! Now I got it! Thank you!

---

<div class="post-metadata">

**Author:** ![frank.paul](https://avatars.discourse-cdn.com/v4/letter/f/c4cdca/32.png) [@frank.paul](https://forum.codewithmosh.com/u/frank.paul)\
**Post date:** [January 11, 2021, 11:53am UTC](https://forum.codewithmosh.com/t/vscode-terminal-problem-python3-app-py-zsh-command-not-found-app-py/1810/8 "2021-01-11T11:53:22Z")

</div>

I just started the course, am brand new to programming. Have a PC and having same problem whether I use $ sign or not. Can someone pls help?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/1X/7987687897e81d20539201679dc09d84b2533d65.png)

---

<div class="post-metadata">

**Author:** ![SAM](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/sam/32/167_2.png) [@SAM](https://forum.codewithmosh.com/u/SAM)\
**Post date:** [January 11, 2021, 12:44pm UTC](https://forum.codewithmosh.com/t/vscode-terminal-problem-python3-app-py-zsh-command-not-found-app-py/1810/9 "2021-01-11T12:44:25Z")

</div>

Looks like you haven’t installed Python yet or didn’t add it to your `PATH`.

---

<div class="post-metadata">

**Author:** ![eylemsutcu](https://avatars.discourse-cdn.com/v4/letter/e/b9bd4f/32.png) [@eylemsutcu](https://forum.codewithmosh.com/u/eylemsutcu)\
**Post date:** [January 11, 2021, 5:25pm UTC](https://forum.codewithmosh.com/t/vscode-terminal-problem-python3-app-py-zsh-command-not-found-app-py/1810/10 "2021-01-11T17:25:39Z")

</div>

Thank you for your help, Sam. It didn’t work for me I still get an error when I type python3 app.py whether I type $ sign or not; However, whatever I did, unfortunately I don’t really know what I did, my terminal window works when I run my program.

---

<div class="post-metadata">

**Author:** ![SAM](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/sam/32/167_2.png) [@SAM](https://forum.codewithmosh.com/u/SAM)\
**Post date:** [January 11, 2021, 7:26pm UTC](https://forum.codewithmosh.com/t/vscode-terminal-problem-python3-app-py-zsh-command-not-found-app-py/1810/11 "2021-01-11T19:26:46Z")

</div>

> [@eylemsutcu](#):
>
> get an error when I type python3 app.py

You are on Windows. The executable on windows is `python`, not `python3`.

> [@eylemsutcu](#):
>
> whether I type $ sign or not

You should never type a `$` in front of an executable name.

> [@eylemsutcu](#):
>
> my terminal window works when I run my program

So your problem is solved?

---

<div class="post-metadata">

**Author:** ![frank.paul](https://avatars.discourse-cdn.com/v4/letter/f/c4cdca/32.png) [@frank.paul](https://forum.codewithmosh.com/u/frank.paul)\
**Post date:** [January 11, 2021, 11:13pm UTC](https://forum.codewithmosh.com/t/vscode-terminal-problem-python3-app-py-zsh-command-not-found-app-py/1810/12 "2021-01-11T23:13:15Z")

</div>

Hi Sam, I had installed python and ticked the path box. I reinstalled it but this time from the Microsoft store and this time its all working. Thanks for your help and responding. Frank

---

<div class="post-metadata">

**Author:** ![Micheal](https://avatars.discourse-cdn.com/v4/letter/m/edb3f5/32.png) [@Micheal](https://forum.codewithmosh.com/u/Micheal)\
**Post date:** [January 12, 2021, 7:47am UTC](https://forum.codewithmosh.com/t/vscode-terminal-problem-python3-app-py-zsh-command-not-found-app-py/1810/14 "2021-01-12T07:47:48Z")

</div>

Please how can I add python to the path because I’m having the same problem

---

<div class="post-metadata">

**Author:** ![eylemsutcu](https://avatars.discourse-cdn.com/v4/letter/e/b9bd4f/32.png) [@eylemsutcu](https://forum.codewithmosh.com/u/eylemsutcu)\
**Post date:** [February 1, 2021, 10:31pm UTC](https://forum.codewithmosh.com/t/vscode-terminal-problem-python3-app-py-zsh-command-not-found-app-py/1810/15 "2021-02-01T22:31:02Z")

</div>

I’m on Mac.  
For your question: Yes and No. My problem has solved for some cases like I can use my terminal and get input for most of the cases but I still get command not found error often when I go through videos.  
Example:  
zsh: command not found: pipenv

---

<div class="post-metadata">

**Author:** ![NicolasATC](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/nicolasatc/32/714_2.png) [@NicolasATC](https://forum.codewithmosh.com/u/NicolasATC)\
**Post date:** [February 2, 2021, 12:54am UTC](https://forum.codewithmosh.com/t/vscode-terminal-problem-python3-app-py-zsh-command-not-found-app-py/1810/16 "2021-02-02T00:54:02Z")

</div>

Follow the instructions I provide on this post:

> [@Python not found...?](https://forum.codewithmosh.com/t/python-not-found/2025):
>
> Hey there, I am not new to Python. But, I just stopped coding for a few months. Then I decided to uninstall Python from my device. After a while, I decided to resume my coding journey… But when I installed Python again and opened VS Code I saw this: I don’t understand why I see this thinking. Please help me sort out this mess. Thanks in advance!! grin

If you are coding in mac, on the terminal type ‘python3’ (without the ‘’) and you should see the version you have installed. If no version appears, you have to uninstall Python3 and install but ADDING PYTHON TO THE PATH! it’s on the first screen of the installer.

Let me know how it goes.

---

<div class="post-metadata">

**Author:** ![lilygrozeva](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/lilygrozeva/32/1014_2.png) [@lilygrozeva](https://forum.codewithmosh.com/u/lilygrozeva)\
**Post date:** [March 11, 2021, 5:13am UTC](https://forum.codewithmosh.com/t/vscode-terminal-problem-python3-app-py-zsh-command-not-found-app-py/1810/17 "2021-03-11T05:13:03Z")

</div>

Hi all - I have another problem when installing Python. I got it installed, I get the version type when I type “python3” however, when I run the code I get this message which I suppose should not be there. Can anyone please help?  
Thank you.

 ![Screenshot at Mar 11 07-12-34](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/c/ccfd304aa1cfadc44b2674d413fb0f9d432b17f9.png)

---

<div class="post-metadata">

**Author:** ![NicolasATC](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/nicolasatc/32/714_2.png) [@NicolasATC](https://forum.codewithmosh.com/u/NicolasATC)\
**Post date:** [March 12, 2021, 12:59pm UTC](https://forum.codewithmosh.com/t/vscode-terminal-problem-python3-app-py-zsh-command-not-found-app-py/1810/18 "2021-03-12T12:59:28Z")

</div>

It seems VS Code is trying to run using Python 2 (which is installed by default).

I posted some time ago a way to run programs. Check this post:

> [@Not a good start. Can't get the first exercise to run](https://forum.codewithmosh.com/t/not-a-good-start-cant-get-the-first-exercise-to-run/2374):
>
> I’m a total beginner and have just downloaded Python and VSCode. When I checked via the terminal (Mac) it recognised python3.

Let me know how it goes.  
Nick

---

<div class="post-metadata">

**Author:** ![khpatil19](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/khpatil19/32/1774_2.png) [@khpatil19](https://forum.codewithmosh.com/u/khpatil19)\
**Post date:** [June 17, 2021, 9:50am UTC](https://forum.codewithmosh.com/t/vscode-terminal-problem-python3-app-py-zsh-command-not-found-app-py/1810/19 "2021-06-17T09:50:17Z")

</div>

I’m sort of facing the same issue - I can run my Python code by clicking on Run followed by “Run Python file in Terminal”. However, I can’t run the code using “Run Code”. I tried changing the Python version in `settings.json`, but no luck. Does anyone have any advice? I’m attaching screenshots for anyone who sees this.

 ![Problem2](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/2/2d24b8548b2f089f41dc0d72f9db5e3fc10f4745.png)

---

<div class="post-metadata">

**Author:** ![Analoger](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/analoger/32/2073_2.png) [@Analoger](https://forum.codewithmosh.com/u/Analoger)\
**Post date:** [September 24, 2021, 12:15pm UTC](https://forum.codewithmosh.com/t/vscode-terminal-problem-python3-app-py-zsh-command-not-found-app-py/1810/21 "2021-09-24T12:15:28Z")

</div>

On windows, you can just say `python app.py`  
Also try adding python to path when installing

---

<div class="post-metadata">

**Author:** ![Analoger](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/analoger/32/2073_2.png) [@Analoger](https://forum.codewithmosh.com/u/Analoger)\
**Post date:** [September 24, 2021, 12:20pm UTC](https://forum.codewithmosh.com/t/vscode-terminal-problem-python3-app-py-zsh-command-not-found-app-py/1810/22 "2021-09-24T12:20:54Z")

</div>

On windows, you have to refer **python** as **python** in the terminal. All the run button is doing is it is openning a terminal, and typing in **python** and your file name and then hitting enter.

**python** _“c:\users\Kaustubh Patil\Desktop\Pending\HelloWorld\app.py”_ ==\> The file name
