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
Question posted in Visual Studio Code
View the official documentation.
View the official documentation.
2
Answers
On MacOS, the right command to run Python is
python3
instead ofpython
. Make sure your scripts usepython3
for better compatibility.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