0

I'm learning Python in recent days and discovered I can use Sublime Text as Python text editor. However I always runned my programs at the "C:\Python34" folder. Now I tried to put my codes in another folder, out of this one, but I don't know why it's not working. Work just at the "Python34" folder...

The console status only shows "Building" and nothing...

My "Python.sublime-build" file:

{
    "cmd": ["python", "-u", "$file"],
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
    "selector": "source.python",
    "encoding": "utf8"
}

Sublime Text 2; Python 3.4; Windows 8.1

Any idea?

Anderson Anizio
  • 143
  • 1
  • 2
  • 12

1 Answers1

0

Try make sure you have Python in your system path:

  1. Windows key + Pause/Break key to shortcut to System.

  2. Click on Advanced System Settings.

  3. Scroll down in System Variables until you find "Path", click "edit"

  4. Look for C:\Python34 in the string; if it's there don't worry, if not, add it in as follows: someDirectory\lastItem;C:\Python34. Seperate with semi-colon. (for windows).

Now, you can change your Python.sublime-build file as follows:

{
    "cmd": ["C://Python34/python.exe", "-u", "$file"],
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
    "selector": "source.python"
}

If needed, change the directory for Python, or change "34" to whichever version you use. Should do the trick.

EDIT: Feel free to leave in your encoding, I just copy/pasted my sublime-build.

maccartm
  • 2,035
  • 14
  • 23
  • Thanks for the reply. Still not working... It's really odd... Seems that the program is building, but it isn't showing nothing. I already tried many other codes on the sublime-build file... – Anderson Anizio Jun 16 '15 at 03:26
  • http://stackoverflow.com/questions/23065859/problems-with-running-python-32-in-sublime-text-2?rq=1 If you follow the steps in this link, does anything change? – maccartm Jun 16 '15 at 15:05
  • Still not working... I tried also this one: http://stackoverflow.com/questions/13110863/sublime-text-dont-build-anything?rq=1 May have some bug in the Sublime... I'll try to update or reinstall... – Anderson Anizio Jun 17 '15 at 04:00