0

在 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)
4

1 回答 1

2

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

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并复制您要自定义的任何键。只需确保每行以逗号结尾,。最后一行不必这样做,但如果这样做不会有任何伤害。

于 2021-07-09T16:29:26.823 回答