sublime配置直接运行python

2019-9-18 张宇童 Python

首先在菜单导航栏找到tools->Build System->New Build System

屏幕快照 2019-09-18 下午2.03.12.png

然后复制下面代码粘贴即可

屏幕快照 2019-09-18 下午2.07.02.png


{
    "env": {"PYTHONIOENCODING": "utf8"},
    "cmd": ["/Library/Frameworks/Python.framework/Versions/3.7/bin/python3", "-u", "$file"],
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
    "selector": "source.python"
}


注意"cmd": ["/Library/Frameworks/Python.framework/Versions/3.7/bin/python3", "-u", "$file"]这里需要改成python的命令路径 which python3 查看python3的路径修改即可

标签: python 工具

发表评论:

Powered by emlog