参考郑晓个人博客:https://www.zh30.com/sublimetext3-ctrlb-python-buildsystem.html
<这是一个简单的方法>
菜单中点击–> 工具 –> 编译系统 –> 新建编译系统
把里面的默认配置内容删除,改成下面这样:
{
"cmd": ["python", "$file"],
"file_regex": "py$",
"selector": "source.python"
}
"cmd": ["python", "$file"],
"file_regex": "py$",
"selector": "source.python"
}
保存,命名为python.sublime-build即可,重命名时的这个python字符串,我觉得改成其它的也可以,它只是会显示在你菜单编译系统列表里而已。
关掉sublime重新打开测试,新建一个.py文件,写一个helloworld, ctrl+b 成功。