skip to Main Content

enter image description hereI really hope someone can help troubleshoot what is causing this issue. Keep getting

/bin/sh: python: command not found

Does anyone have any suggestions? I Saw some other people had the same issue but the workaround was installation via Home Brew, which didn’t seem to help in my case.

I’ve tried uninstalling and re-installing Python3 multiple times and finally tried installing it via Home Brew. Everything seems ok, it is for sure the latest version installed on my Mac. But trying to run a simple print script in VScode and I keep getting this error message.

2

Answers


  1. Chosen as BEST ANSWER

    I figured out is was actually a setting in the code runner extension causing the issue. By just adjusting the json. setting in the extension from python to python3, it resolved the issue.


  2. You’re most likely using the wrong interpreter path.

    1. Use Command + P to open up the search bar
      List item

    2. Then type > and select Python: select interpreter option.

    enter image description here

    1. Then select your interpreter

    enter image description here

    If for some reason you VScode didn’t already detect your interpreter in your system you can input the path manually on the top option

    Alternatively, the command can be python3 as opposed to just python

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search