vscode: Interactive plots not working via remote ssh
Applies To
- Notebooks (.ipynb files)
- Interactive Window and/or Cell Scripts (.py files with #%% markers)
What happened?
I have a working environment in a remote server that have GPUs. I work in ubuntu 20.04 and the server also runs ubuntu 20.04, I like the remote ssh extension for running my scripts and notebooks in the server. However, when trying to plot interactive plots, these do not render.
For instance, working with matplotlib I am able to plot inline plots with %matplotlib inline
but when I use %matplotlib widget
or %matplotlib qt
(interactive) the cell runs properly but nothing is showed (In the case of “qt” the cells keeps running, as it does in a local environment until the pop up window with the figure is closed).
Interactive plots are very useful for getting fast insights in some figures.
I also tried opening a parallel ssh -X user@server
connection as I found in this answer
But still no luck.
VS Code Version
Version: 1.66.0 Commit: e18005f0f1b33c29e81d732535d8c0e47cafb0b5 Date: 2022-03-30T05:50:41.156Z Electron: 17.2.0 Chromium: 98.0.4758.109 Node.js: 16.13.0 V8: 9.8.177.11-electron.0 OS: Linux x64 5.13.0-39-generic
Jupyter Extension Version
v2022.3.1000901801
Jupyter logs
There are no outputs
Coding Language and Runtime Version
Python v3.8.10
Language Extension Version (if applicable)
Python v2022.4.0
Anaconda Version (if applicable)
No response
Running Jupyter locally or remotely?
Remote
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 3
- Comments: 47 (31 by maintainers)
Commits related to this issue
- Add message logging for #148662 — committed to microsoft/vscode by roblourens 2 years ago
- Add message logging for #148662 — committed to microsoft/vscode by roblourens 2 years ago
- Add message logging for #148662 — committed to microsoft/vscode by roblourens 2 years ago
- Add message logging for #148662 — committed to microsoft/vscode by roblourens 2 years ago
Both pieces of code run Ok!