I am currently using the Anaconda python distribution for my project (NOT the anaconda plugin, they have the same name, but the one I am using includes Numpy, IPython, etc. It is kinda confusing). So I want to change the default python (v3.3) to the one in Anaconda (v2.7.6), in that case I will be able to use the libraries embedded in Anaconda. I tried to put a new script under Tool > Build System > New Build System.
{
"path": "/home/username/anaconda/bin",
"cmd": ["python", "-u", "$file"],
"file_regex": "^[ ]*File "(...*?)", line ([0-9]*)",
"selector": "source.python"
}
But it failed, the sublime is still using the default interpreter:
>>>print (sys.version)
3.3.0 (default, Jun 12 2013, 17:01:35)
[GCC 4.7.2]
>>> print (sys.executable)
python3
>>> print (sys.path)
['/opt/sublime_text', '/opt/sublime_text/python3.3.zip', '/home/username/.config/sublime-text-3/Packages']
So my question is quite simple (but hard enough for one who doesn't know):
How to change this default python interpreter to the one I want;
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…