1.打开Sublime Text
2.上方工具栏Tools->Build System->New Build System...
将如下代码粘贴进去
{
"cmd": ["/Library/Frameworks/Python.framework/Versions/3.7/bin/python3", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}
如果不知道自己的python路径
终端里运行
which python3
3.Command+s,命名为Python-3.7.sublime-build,路径目录记得是User
4.选择Tools->Build System->Python3.7
完事了
网友评论