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?

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

3 Comments

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...
stackoverflow.com/questions/23065859/… If you follow the steps in this link, does anything change?
Still not working... I tried also this one: stackoverflow.com/questions/13110863/… May have some bug in the Sublime... I'll try to update or reinstall...

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.