Home > OS >  (zsh: command not found: python) MacOS VS Code
(zsh: command not found: python) MacOS VS Code

Time:09-21

When I try to run the Python code on Visual Studio Code it says zsh: command not found: python. I'm sure the Python extension is installed on VS Code and I have Python 3.10.6 and I'm using macOS Monterey 12.5.1

CodePudding user response:

On MacOS, the right command to run Python is python3 instead of python. Make sure your scripts use python3 for better compatibility.

CodePudding user response:

If you have installed the Python extension correctly, you should be able to run the Python code by clicking on the drop-down menu in the top left corner of VsCode's screen and clicking on "Run Python File"

Here is the Python extension: https://marketplace.visualstudio.com/items?itemName=ms-python.python

  • Related