首先,我知道这个问题被问了很多很多次,但是通过阅读其他答案,我没有找到问题的答案。
我正在使用 Sublime Text 3,但根本无法理解构建系统!
我有最简单的 Python 文件,仅包含 print 'test'
。
我的构建文件并不复杂,因为它是:
{
"selector": "source.python",
"cmd": ["echo test"],
}
但是,当尝试运行它时,我得到:
[WinError 2] The system cannot find the file specified
[cmd: ['echo test']]
[dir: C:\P4\depot\test]
[path: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\CCM;C:\Python27\;C:\Python27\Scripts]
[Finished]
据我了解,出现此错误主要是因为 %PATH%
问题,但我认为这不可能是这里的问题,因为我调用了系统命令。
那么,你知道如何解决这个问题吗?
谢谢:)
最佳答案
对于那些感兴趣的人,答案很简单:改变:
"cmd": ["echo test"]
进入
"shell_cmd": "echo test"
再一次,我的问题与 Python 本身无关,而更多的是在 Sublime Text 中构建系统,我发现这些系统的文档记录非常少。
关于python - Sublime Text : "The system cannot find the file specified" error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32589479/