Mac 上SublimeText 如何编写运行 python3

2019-04-17  本文已影响0人  xukang919

SublimeText 配置python环境

1、打开sublime-text 选择语法 python ,编写简单的hello world

image

2、配置python环境

image

3、这时会打开一个默认的配置文件

image

4、删除原有内容,将下面代码赋值粘贴到文件中,并保存。路径不变,命名为Python3.sublime-build.


{

    "cmd": ["/Library/Frameworks/Python.framework/Versions/3.7/bin/python3", "-u", "$file"],

    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",

    "selector": "source.python"

}

image

这时候就能看见有python3编译环境了

image

5、点击build,就能看见输出结果

image
上一篇 下一篇

猜你喜欢

热点阅读