交互式窗口中的 VS 代码运行选择不起作用

问题描述

我有 VS 代码 1.56,我试图在其中运行 python 和 julia。 我在交互式窗口中运行选定的 python 代码时遇到了一些问题。 当我按下键绑定(shift + enter)时,我没有任何动作。 我尝试“切换键盘快捷键故障排除”,但得到以下日志

[2021-05-11 14:08:54.305] [renderer1] [info] [KeybindingService]: \ From 13 keybinding entries,matched jupyter.execSelectionInteractive,when: editorTextFocus && jupyter.ownsSelection && !findInputFocussed && !notebookEditorFocused && !replaceInputFocussed && editorLangId == 'python',source: user extension ms-toolsai.jupyter.
[2021-05-11 14:08:54.308] [renderer1] [error] spawn python ENOENT: Error: spawn python ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:465:16)
    at processticksAndRejections (internal/process/task_queues.js:80:21)

我阅读了 here标记“Jupyter:将选择发送到交互式窗口”,但仍然不起作用。

您有什么建议吗?

解决方法

first image

在结果列表中,将快捷键 Run .. in Terminal、Run .. in Interactive Windows 和 Run Cell 的键绑定分别更改为 Shift+Enter、Alt+Enter 和 Ctrl+Enter,或者您喜欢的任何方式只要不再出现冲突。

或者,您也可以使用 shift+enter 键查找所有快捷方式:转到

SecondImage

在结果列表中,更改或删除(右键单击 -> 删除键绑定或删除)与相同键绑定的快捷键的键绑定。