The reason for that is that is one of the following:
- You don’t have Python installed on your computer
- You have Python installed, but it is not in the system
PATH, so the OS can’t find it when you try to execute it.
For the first case, it’s a common misconception that because Sublime internally uses Python that you can use that bundled version of Python to run your own scripts, or that globally installed python modules are visible to Sublime in general. The Python that comes bundled with Sublime is built into the executable and is only for the use of Sublime itself and any plugins that you create/install, so you can’t use it to run external scripts.
For the second case, how you fix that is dependent on your operating system. From the looks of the error message I’m guessing you’re using Windows. In that case, the installer that installs Python for you can do this automatically; look for it to ask you about it or check the appropriate box when prompted (it’s been a while so I can’t remember exactly how it’s presented).
For Linux and MacOS you’re left to set up the path yourself, assuming that you didn’t do the install to a location that’s already in the path.
In general (regardless of your operating system), you need to be able to open any command prompt and type python as a command and have it respond something like this (your installed version may vary, etc).
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\tmartin>python
Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AM
D64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>