为什么我的控制台在 Sublime 上给我一堆错误信息?

Why is my console giving me a bunch of error messages on Sublime?

在 Sublime Text 3 中下载 Terminus(我不知道这是否与问题有关)后,我注意到当我按下“ctrl+`”时,它打开了控制台并显示了大量错误消息。这是怎么回事,我该如何解决?提前致谢!

这是错误:

Make sure your interpreter is a valid binary and is in your PATH or use an absolute path to it, for example: C:\Python27\python.exe
 ...last message repeated one more time in the last 10s
ERROR:root:Your operating system denied the spawn of /usr/local/bin/python3 process. Make sure your configured interpreter is a valid python binary executable and is in the PATH
The OS did return [WinError 2] The system cannot find the file specified
anacondaST3: ERROR - <Anaconda.anaconda_lib.workers.local_process.LocalProcess object at 0x0000017199588518> process can not start a new anaconda JsonServer in the operating system because:
Anaconda can not spawn a new process with your current configured python interpreter (/usr/local/bin/python3)
Make sure your interpreter is a valid binary and is in your PATH or use an absolute path to it, for example: C:\Python27\python.exe
anacondaST3: ERROR - <Anaconda.anaconda_lib.workers.local_process.LocalProcess object at 0x00000171991DFDA0> process can not start a new anaconda JsonServer in the operating system because:
Anaconda can not spawn a new process with your current configured python interpreter (/usr/local/bin/python3)

此错误与 Anaconda 插件有关,与 Terminus 无关。您需要将路径设置为默认 Python 解释器。如果您还不知道,请点击 WinR 然后输入 cmd 并点击 Enter。在打开的 window 中,输入

where python

并且将打印出一行或多行,假设您已经安装了 Python 并且在您的 PATH 中。记下第一行。

接下来,返回到 Sublime 并转到 Preferences → Package Settings → Anaconda → Settings—User。如果文件 不是 空,添加行

"python_interpreter": "c:/path/to/python.exe",

用实际路径替换path/to/。您可以使用单正斜杠 / 作为路径分隔符,也可以使用双反斜杠 \。只是不要使用单个反斜杠,因为这可能会导致问题。

如果用户首选项文件中没有任何内容,请将其内容设置为以下内容:

{
    "python_interpreter": "c:/path/to/python.exe",
}

保存文件,希望错误消息会消失。如果您想在那里配置有关 Anaconda 的任何其他内容,请打开 Preferences → Package Settings → Anaconda → Settings—Default 并复制您想要自定义的任何键。只需确保每行以逗号 , 结尾。最后一行不是必须的,但如果这样做也不会造成任何伤害。