From:http://blog.csdn.net/hun__ter/article/details/51223031

安装sublime text3后,按Ctrl+b无法运行python文件。

解决方法:

打开sublime -> tools -> build system ->new build system,在打开的新tab页面添加如下内容:

{
    "cmd": ["python", "-u", "$file"],
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
    "selector": "source.python"
}

 前提是“python”是可执行命令。

 然后Ctrl+s保存到目录(Sublime Text3/Packages/User,保存时的默认目录),可任意命名,后缀名不能更改。

然后在tools→build system中选择文件的名称。

然以后通过Ctrl+b命令即可运行Python文件。

相关文章:

  • 2022-12-23
  • 2021-05-12
  • 2021-08-22
  • 2021-12-27
  • 2021-06-27
  • 2021-06-19
  • 2022-01-04
  • 2021-11-07
猜你喜欢
  • 2022-12-23
  • 2021-06-30
  • 2022-12-23
  • 2021-12-13
  • 2022-01-06
  • 2021-12-30
  • 2022-12-23
相关资源
相似解决方案