我有 VS code 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:将选择发送到交互式窗口”,但仍然不起作用。
你有什么建议吗?
我知道这个线程很旧,但我多年来一直遇到同样的问题。这不是一个冲突的键绑定,而是由于我没有尝试追查的原因,何时条件没有得到满足。
就我而言,我能够通过更改键盘快捷键中的条件并删除“&& jupyter.ownsSelection”块来解决问题。这恢复了全部功能。
我之前删除了用于在终端中执行代码片段的键绑定,这会发生冲突。