Execute Python in Sublime Text 2, Windows 8


Video is ready, Click Here to View ×

How to execute Python scripts from within sublime text 2. Sublime text doesn’t know were you have python installed on your system.


27 thoughts on “Execute Python in Sublime Text 2, Windows 8

  1. thanks for the tutorial… I was actually following another tutorial and was getting so frustrated because I was doing everything he was doing to set the path to my python.exe but he failed to mention that you have to add two backslashes in your path like you did and now that I added the two backslashes everything works properly now. So thanks for that little detail.

  2. This is actually quite awkward. I'm using Sublime Text 2, and I didn't have to do anything here for the execution to run normally. I'm able to run python files on Sublime Text 2 by default, instead of having all these problems the people in the comment section were facing.

  3. +Michael Thomas when i run my py program it gets stuck at any place where raw_input is involved ie
    variable=raw_input() I cannot seem to find a way to enter the input in the sublime console. If I type in anything and press enter nothing happens while in cmd the program would work fine.
    Another example:
    print 'Hello Friend. Whats your name?'
    print 'Your name is %s'%(name)
    print 'Have a great day!'

  4. Hey guys, if you don't have the python package like me just make one manually and copy this text and add your python file path to the double asterisks place holder.

    "cmd": [" *Python file path here* ", "-u", "$file"],
    "file_regex": "^[ ]File "(…?)", line ([0-9]*)",
    "selector": "source.python"

    Then save it as Python.sublime-build in the python folder you just made.

    This worked for me guys. Hope it works for you!

Leave a Reply

Your email address will not be published. Required fields are marked *