0

when i build a python programme in sublime text i get

python' is not recognized as an internal or external command,operable program or batch file. [Finished in 1.0s with exit code 1]

enter image description here

The issue is sublime text can't locate the path where python. when i try to do manually put the path i.e c:\python34\python.exe I can't go ahead of preferences browse packages as there are no option to select python

How to proceed further what to do

guys for your clearation i have added the environment variable and python works perfectly fine in cmd.. enter image description here

this is the complete error i am getting

Raptor
  • 53,206
  • 45
  • 230
  • 366
ASEN
  • 167
  • 1
  • 10
  • 2
    possible duplicate of [How do I run Python code from Sublime Text 2?](http://stackoverflow.com/questions/8551735/how-do-i-run-python-code-from-sublime-text-2) – ha9u63a7 Mar 18 '15 at 23:15
  • Why downvotes someone should upvote it is commonly faced problem – ASEN Jun 12 '15 at 21:00

3 Answers3

1

Tools - Build System - New Build System

{
    "cmd": ["path_to_your_python", "$file"]
}

than just use this build system.

Ben Usman
  • 7,969
  • 6
  • 46
  • 66
0

Sublime, if you haven't noticed already, is created with Python so you can expect it to have full support for the language. Based on your error, I'd venture to guess that you haven't added Python to your path. Watch the video here for instructions. Otherwise, you can watch this video for how to change build configurations.

Malik Brahimi
  • 16,341
  • 7
  • 39
  • 70
0

Finally it solved thanks to Ben Usman and ha9u63ar what i did was

           Tools - Build System - New Build System

 {
"path": "/usr/local/bin",
"cmd": ["python3", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
 "selector": "source.python"
 }
ASEN
  • 167
  • 1
  • 10