- 在工具栏点击Preferences,打开Browse Packages
- 找到Python文件夹,并打开
- 找到文件Python.sublime-build文件,用记事本或者其他方法打开
- 修改内容如下,主要是加一个path:
{
"cmd": ["python", "-u", "$file"],
"path":"C:/Python27",
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}
把path里面的内容修改为Python的安装目录即可
- Windows下python 2.7,默认安装目录是"C:/Python27"
- Windows下python 3.5,默认是"C:/Users/admin/AppData/Local/Programs/Python/Python35"