Whenever you tell your computer to run a program (be it Windows, MacOS or Linux), the first step it takes is to find the program that you told it to execute. If you give it a specific name of a file, like
C:\Program Files\Python36\python.exe, then it looks in exactly that location for that thing. On the other hand, if you just said
python, then it has to figure out what that actually is.
Since there are an arbitrarily large number of potential locations where a program could possibly be, instead of performing an exhaustive search for a program every time you try to run it the system has the concept of something called a
PATH, which is a list of directories on your computer where it will look for programs.
How you set the
PATH depends on the operating system that you use, as well as the version of that operating system. So if you need to fiddle it the best bet is to do a quick google for how to do it for your specific operating system and version.
That said, if you ticked the box to tell it to update the path during the Python install, then you're already money ahead. If you had Sublime running when you installed Python, you might need to quit and restart Sublime in order for it to pick up the change.
All else being equal, if you open a fresh command prompt/terminal you can use the
where command on Windows or the
which command on Linux/MacOS in order to see if the system knows about a program and if so, where it is. If this command gives you a location, it knows where the program is and it should work from Sublime; if you get an error or no response, then the folder that contains the program will need to be added to the path.
For example, on WIndows 10, you either get told the exact location of what the system would run (the first thing it found), or you get an informative message telling you that it didn't find anything:
INFO: Could not find files for the given pattern(s).
On Linux and MacOS, the command tells you where the first matching command is if it found it, or nothing at all if it didn't, leaving you to infer that it could not be found:
tmartin:dart:~> which python
tmartin:dart:~> which some_program
tmartin:tmac:~\> which python
tmartin:tmac:~\> which some_program