我按照这些步骤在Sublime Text 3上运行Python 3.
选择菜单工具>构建>新构建系统,然后输入以下内容:
{
"cmd": ["python3", "$file"]
, "selector": "source.python"
, "file_regex": "file \"(...*?)\", line ([0-9]+)"
}
Run Code Online (Sandbox Code Playgroud)
之后,我将其保存到以下(特定于Mac)目录:〜/ Library/Application Support/Sublime Text 3/Packages/User
但是当我在Sublime中尝试在Python 3上运行我的代码时,我遇到了这个错误:
[Errno 2] No such file or directory: 'python3'
Run Code Online (Sandbox Code Playgroud)