vscode-jupyter
vscode-jupyter copied to clipboard
Suggested extensions aren't installed when connecting over SSH
Applies To
- [ ] Notebooks (.ipynb files)
- [ ] Interactive Window and/or Cell Scripts (.py files with #%% markers)
What happened?
- Connect to the remote machine using the Remote - SSH extension.
- Open any Python notebook (*.ipynb) on the remote machine.
- Press
Select Kernel
button. - Press
Install/Enable suggested extensions
in the popup: - VSCode is "installing" the extensions.
- Nothing actually gets installed, the same popup from step 4 appears again.
- In the Extension tab we can see that nothing got installed on the remote machine. Installing suggested extensions manually does work though.
VS Code Version
Version: 1.81.1 (user setup) Commit: 6c3e3dba23e8fadc360aed75ce363ba185c49794 Date: 2023-08-09T22:22:42.175Z Electron: 22.3.18 ElectronBuildId: 22689846 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0.19045
Jupyter Extension Version
v2023.7.1002162226
Jupyter logs
No response
Coding Language and Runtime Version
No response
Language Extension Version (if applicable)
No response
Anaconda Version (if applicable)
No response
Running Jupyter locally or remotely?
N/A or Not sure
If anyone is interested, a work-around is to configure VSCode to automatically install the required packages for all remote SSH connections. This can be done by editing the settings.json file as explained here.
Each extension has a unique identifier listed under "More Info". For example, for the Python extension, the unique identifier is "ms-python.python".
Modifying settings.json is explained here, or in short follow the instructions below for Windows:
- F1 to open the command pallet, type "open settings", select "Open User Settings (JSON)". This will open settings.json
- Add the following key:value pair to the dict:
"remote.SSH.defaultExtensions": [
"ms-toolsai.jupyter",
"ms-python.python"
]
- Save and close VSCode. Re-launch VSCode and the extensions should be installed.
- Click on "Select Kernel", choose the kernel from the existing venv directory.
- Click OK when prompted to install ipython extension. "Select Kernel" on the top bar should be replaced with the selected kernel (e.g. "venv (Python 3.8.10)").