Sublime Python3编译环境修改
添加编译环境python3.6
Tools -> Build System -> New Build System
在打开的文件里面贴上以下代码,保存,设置为当前编译环境即可
{
"cmd":["/usr/local/bin/python3","-u","$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"env": {"PYTHONIOENCODING": "utf8"},
"selector": "source.python"
}
注意:其中[/Library/Frameworks/Python.framework/Versions/3.6/bin/python3] 为自己python的安装路径
Mac 下查看python3路径的方法
终端下:which python3
测试一下环境是否正确
print (‘hello’)
Sublime text 2 如何更改 build system?
在参数选项栏(Preference)里,打开 browse packages 选项
Henry