I’ve just installed Sublime Text 2 and so far I’m really impressed by it, and I’m looking forward to learning more about it’s power features.
BUT THIS HAS BEEN DRIVING ME CRAZY!
As I understand it, Sublime Text 2 runs the Mac OS X installed Python, which is version 2.6.
This means that modules that I’m trying to call in my secret project, which need Python 2.7, error out.
I HAVE SPENT HOURS GOOGLING THIS.
I really can’t understand why this;
a) hasn’t been a problem for more people than me, and
b) isn’t documented anyway, to a point that I could easily pick up and use.
In the end, the solution for me was;
In the file Sublime.python-build, add the following entry to point Sublime to whichever version of Python you want. I found that using usr/bin/PythonXX didn’t work for me, possibly because I don’t have things sym-linked appropriately.
“cmd”: [“/Library/Frameworks/Python.framework/Versions/2.7//bin/python2.7”, “-u”, “$file”],
“file_regex”: “^[ ]*File “(…*?)”, line ([0-9]*)”,
Some of the (many, many) resources I used;
Sublime Text 2 Forum