Home Download Buy Blog Forum Support

Python Help

Python Help

Postby Pumafied on Sat Mar 17, 2012 10:46 pm

Hello everyone I have been using sublime text for quite a while to design web pages and edit configs to be honest I love it. The only issue that I have been having with it recently is when I have been trying out python. I looked around the internet and they said that control + b would run it. However when I run a program with it all it puts out is
Code: Select all
[Error 2] The system cannot find the file specified
[Finished]

This makes it hard to justify useing sublime text over IDLE please get back to me soon I want my text editor that I love back.
Pumafied
 
Posts: 2
Joined: Sat Mar 17, 2012 10:42 pm

Re: Python Help

Postby agibsonsw on Sat Mar 17, 2012 11:16 pm

Ctrl-B might be running a different build. Try choosing it specifically from the Tools menu, Build System, Python. Thereafter, Ctrl-B should default to Python.

Otherwise, search for the file 'Python.sublime-build'. It should be in (on my system) 'Packages\Python'. Mine contains:

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


Failing the above, it might be a path issue..
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
agibsonsw
 
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm

Re: Python Help

Postby Pumafied on Sun Mar 18, 2012 3:25 am

What you told me to didnt work how would I resolve a path issue?
Pumafied
 
Posts: 2
Joined: Sat Mar 17, 2012 10:42 pm

Re: Python Help

Postby riffito on Fri Mar 23, 2012 7:02 pm

Pumafied wrote:What you told me to didnt work how would I resolve a path issue?



Make sure that the Python executable is in your PATH environmental variable. The some Python distribution for Windows (older versions?) didn't added it at installation time.

If you can call the Python interpreter from any console window ('cmd.exe'), then you have some other problem.
riffito
 
Posts: 17
Joined: Wed Dec 21, 2011 2:30 pm


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], Yahoo [Bot] and 22 guests