更新时间:2022-04-26 01:18:51
你收到错误的原因是你有一个 Unix 风格的 python
可执行文件路径,当你运行 Windows.将 /usr/bin/python3
更改为 C:/Python32/python.exe
(确保使用正斜杠 /
而不是 Windows-样式反斜杠 \
).进行此更改后,您应该一切准备就绪.
The reason you're getting the error is that you have a Unix-style path to the python
executable, when you're running Windows. Change /usr/bin/python3
to C:/Python32/python.exe
(make sure you use the forward slashes /
and not Windows-style back slashes \
). Once you make this change, you should be all set.
此外,您需要将单引号 '
更改为双引号 "
,如下所示:
Also, you need to change the single quotes '
to double quotes "
like so:
{
"cmd": ["c:/Python32/python.exe", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}
.sublime-build
文件需要是有效的 JSON,它要求字符串用双引号括起来,而不是单身.
The .sublime-build
file needs to be valid JSON, which requires strings be wrapped in double quotes, not single.