我刚开始使用 Sublime Text 2 并且想知道是否有办法将集成的 python 解释器更改为针对系统 python 安装而不是 Sublime 附带的那个。原因是因为我想将计算机上的 python 库与 python 解释器一起使用。
我知道使用我的 python 版本在 sublime 中运行 python 代码,如下所示:How do I run Python code from Sublime Text 2?
但是,这不会更改您正在运行的 python 解释器的版本。
有任何想法吗?
最佳答案
工具 > 构建系统 > 新建构建系统。插入文件并使用您的 python 版本:
{
"cmd": ["python3", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}
关于sublimetext2 - 更改 python 解释器 - Sublime Text 2,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/11313131/