1、找到首选项→浏览包
2、找到python文件夹,没有就创建一个,在python文件夹里,再建一个文件命名为 Python.sublime-commands,文件内容如下
{
"cmd":["python.exe", "-u", "$file"],
"path":"C:\Users\Administrator\AppData\Local\Programs\Python\Python36",
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}
path填写python的安装路径
3、选择Build System→Python
4、点击Tools→Bulid即可运行,快捷键Ctrl+B