I have VS code 1.56 where I'm trying to run both python and julia. I have some problems running selected python code in the interactive windows. When I press the keybindings (shift + enter) I don't get any action. I tried to "toggle keyboards shortcuts troubleshooting" and I get the following log
[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)
I read here to flag "Jupyter: Send Selection To Interactive Window" but still doesn't work.
Do you have any suggestions?
I know this thread is old but I have had the same problem for ages. It was not a conflicting keybinding but rather that, for a reason I have not tried to track down, the when condition was not being satisfied.
In my case, I was able to solve the problem by changing the when condition in the Keyboard Shortcuts and removing the "&& jupyter.ownsSelection" block. This restored full functionality.
I previously removed the keybinding for executing code fragment in the terminal, which conflicted.
None of the above worked for me. I finally made it work by:
And yes, it works with .py files. And you need to have the # %% cells

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With