Sublime Forum

Not able to run the file in command prompt

#1

As soon as I try to run my code,as stored in the text file, through the command promt, I receive the following message :‘python’ is not recognized as an internal or external command,
operable program or batch file.

Kindly provide a solution,

0 Likes

#2

This isn’t related to Sublime at all and is a general computing question, unless you have read somewhere or believe that since Sublime is extensible via Python scripts that it has a Python interpreter for you to use in your own programs. Sublime does have a Python interpreter embedded in it, but it’s for internal Sublime use and can’t run arbitrary user scripts.

Python is generally only pre-installed on MacOS and Linux (and may depend on your version in either case). The text of your error message and the error in general seem to indicate you’re on Windows and you haven’t installed Python yet.

You probably want to go to the Python download page and download and install an appropriate version of Python on your computer. During the install, watch for any place it asks you if it should modify your environment and say yes to ensure that the Python install location is placed on your PATH for you; otherwise you may have to do that yourself manually later.

0 Likes