microsoft / vscode-jupyter

VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
MIT License
1.28k stars 285 forks source link

%matplotlib QT5 doesn't work #8322

Closed gonghenghai closed 2 years ago

gonghenghai commented 2 years ago

Environment data

Expected behaviour

Execute the cells

Actual behaviour

Just waiting

Screenshot (109)_LI

DonJayamanne commented 2 years ago

Thanks for filing this issue, & I"m sorry yo'ure running into this. We've been working on some perf related fixes and the like in our current development branch.

Please could you

See here image

* Reload VS Code
faultdiagnosistoolbox commented 2 years ago

I will try to contribute with the information, I asked the original question at https://stackoverflow.com/questions/70056478/vscode-python-interactive-window-freezes-when-using-matplotlib

First I can confirm that when not running %matplotlib (or even running %matplotlib inline) all works as expected. It is only when I have the external window that I see the problem.

I've installed the code-insider edition and the python (including the jupyter) extension version Jupyter v2021.11.1001498571.

Then I

  1. Activate verbose jupyter logging
  2. Restart vscode insider
  3. Create a jupyter interactive window
  4. Run %matplotlib
  5. run 1+1 (finishes in 0.2s), run 1+2 (finishes in 1m 39s)

I have attached the debug output to this message.

Thanks for investigating the issue, Erik

debug_jupyter.txt

DonJayamanne commented 2 years ago

@faultdiagnosistoolbox Looks like you have failed to attach the logs correctly. Please could you re-attach them FYI - I'm unable to replicate this same issue.

DonJayamanne commented 2 years ago

It is only when I have the external window that I see the problem.

Oh, ok, I have not tried this.

DonJayamanne commented 2 years ago

Tried, still unable to repro. I must be missing something

This is the code I"m using

%matplotlib
import matplotlib.pyplot as plt
import numpy as np

x = np.linspace(0, 10, 100)

plt.plot(x, np.sin(x))
plt.plot(x, np.cos(x))

plt.show()

& this is the output I get in VS Code Using matplotlib backend: <object object at 0x00000129A3DDB4E0> Basically the plot doesn't open up, i get an empty Window. However I'm able to run subsequent cells. Seems to be the case in VS Code stable as well.

When running the same code in Jupyter i the the output using matplotlib backend: TkAgg.

@faultdiagnosistoolbox @gonghenghai For now here's the work around:

More info here https://matplotlib.org/stable/users/explain/interactive.html?highlight=vscode#jupyter-notebooks-jupyterlab & https://matplotlib.org/stable/users/explain/backends.html?highlight=ipympl

faultdiagnosistoolbox commented 2 years ago

OK, strange. I have tried on 4 machines. It fails identically on two Macs (iMac, Macbook Pro) and my Ubuntu 20.04 Linux laptop. On my office Linux, also Ubuntu 20.04, workstation I can't reproduce.

I thought I attached the debug log. I have copy-pasted it below, hope that is the correct way.

Erik


Python Extension Verison: 2021.11.1422169775.
Info 18:53:13: Experimentation service retrieved: [object Object]
User belongs to experiment group 'jupyterTestcf'
User belongs to experiment group 'jupyterEnhancedDataViewer'
Info 18:53:13: ZMQ install verified.
Verbose 18:53:13: Get Custom Env Variables, Class name = m (started execution), Arg 1: undefined
Verbose 18:53:13: Get Custom Env Variables, Class name = m (started execution), Arg 1: "~/tmp/vsc_test"
Verbose 18:53:13: Get Active Interpreter, Class name = P (started execution), Arg 1: "~/tmp/vsc_test"
Verbose 18:53:13: Get Custom Env Variables, Class name = m, completed in 2ms, has a truthy return value, Arg 1: undefined
Error 18:53:13: Failed to parse env file /home/erifr93/tmp/vsc_test/.env EntryNotFound: Unable to read file '/home/erifr93/tmp/vsc_test/.env' (Error: Unable to resolve nonexistent file '/home/erifr93/tmp/vsc_test/.env')
    at Ei.doReadFileStream (vscode-file://vscode-app/usr/share/code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:576:25010)
    at async Ei.doReadFile (vscode-file://vscode-app/usr/share/code-insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:576:24026)
Verbose 18:53:13: Get Custom Env Variables, Class name = m, completed in 32ms, has a truthy return value, Arg 1: "~/tmp/vsc_test"
Verbose 18:53:13: Get Active Interpreter, Class name = P (started execution), Arg 1: undefined
Verbose 18:53:13: Get Interpreters, Class name = P (started execution), 
Info 18:53:13: Experiment status for python is {"enabled":true,"optInto":[],"optOutFrom":[]}
Verbose 18:53:14: Get Active Interpreter, Class name = P, completed in 245ms, has a truthy return value, Arg 1: undefined
Verbose 18:53:14: Create activated Env, Class name = k (started execution), Arg 1: ""
Verbose 18:53:14: Getting activated env variables, Class name = D (started execution), Arg 1: undefined, Arg 2: "~/sw/pyenv/39/bin/python", Arg 3: true
Verbose 18:53:14: Getting activated env variables ourselves, Class name = D (started execution), Arg 1: undefined, Arg 2: "~/sw/pyenv/39/bin/python"
Verbose 18:53:14: Getting env activation commands, Class name = D (started execution), Arg 1: undefined, Arg 2: "~/sw/pyenv/39/bin/python"
Verbose 18:53:14: Create ProcessService, Class name = p (started execution), Arg 1: undefined
Verbose 18:53:14: Get Custom Env Variables, Class name = m (started execution), Arg 1: undefined
Verbose 18:53:14: Cached data exists getEnvironmentVariables, <No Resource>
Verbose 18:53:14: Getting activated env variables from Python, Class name = D (started execution), Arg 1: undefined, Arg 2: "~/sw/pyenv/39/bin/python"
Verbose 18:53:14: Get Active Interpreter, Class name = P, completed in 319ms, has a truthy return value, Arg 1: "~/tmp/vsc_test"
Verbose 18:53:14: Get Custom Env Variables, Class name = m, completed in 0ms, has a truthy return value, Arg 1: undefined
Verbose 18:53:14: Create ProcessService, Class name = p, completed in 1ms, has a truthy return value, Arg 1: undefined
Verbose 18:53:14: Getting env activation commands, Class name = D, completed in 1ms, has a falsy return value, Arg 1: undefined, Arg 2: "~/sw/pyenv/39/bin/python"
Verbose 18:53:14: Getting activated env variables ourselves, Class name = D, completed in 3ms, has a falsy return value, Arg 1: undefined, Arg 2: "~/sw/pyenv/39/bin/python"
Verbose 18:53:14: Got env vars ourselves faster, but empty ~/sw/pyenv/39/bin/python
Verbose 18:53:14: Got env vars ourselves ~/sw/pyenv/39/bin/python in 3ms
Verbose 18:53:14: Getting activated env variables from Python, Class name = D, completed in 113ms, has a truthy return value, Arg 1: undefined, Arg 2: "~/sw/pyenv/39/bin/python"
Verbose 18:53:14: Got env vars with python ~/sw/pyenv/39/bin/python in 114ms
Verbose 18:53:14: Getting activated env variables, Class name = D, completed in 114ms, has a truthy return value, Arg 1: undefined, Arg 2: "~/sw/pyenv/39/bin/python", Arg 3: true
Verbose 18:53:14: Create activated Env, Class name = k, completed in 115ms, has a truthy return value, Arg 1: ""
Info 18:53:14: Process Execution: > ~/sw/pyenv/39/bin/python -m pip list
> ~/sw/pyenv/39/bin/python -m pip list
Verbose 18:53:14: Get Interpreters, Class name = P, completed in 477ms, has a truthy return value, 
Info 18:53:36: Creating controller for interactive with interpreter ~/sw/pyenv/39/bin/python
Info 18:53:36: Starting interactive window with controller ID ms-toolsai.jupyter/.jvsc74a57bd0b2d30df487f2f295440af491f15be1736706da7a0a50c540ff6414a45436c63c./home/erifr93/sw/pyenv/39/python./home/erifr93/sw/pyenv/39/python.-m#ipykernel_launcher (Interactive)
Verbose 18:53:36: Get Kernelspec root path, Class name = m (started execution), Arg 1: {"_isCancelled":false,"_emitter":null}
Verbose 18:53:36: Get Jupyter Paths, Class name = m (started execution), Arg 1: {"_isCancelled":false,"_emitter":null}
Verbose 18:53:36: Get Custom Env Variables, Class name = m (started execution), 
Verbose 18:53:36: Cached data exists getEnvironmentVariables, <No Resource>
Verbose 18:53:36: Get Interpreters, Class name = P (started execution), Arg 1: undefined
Verbose 18:53:36: Get Interpreters, Class name = P (started execution), Arg 1: undefined
Verbose 18:53:36: Get Active Interpreter, Class name = P (started execution), Arg 1: "Interactive-1.interactive"
Info 18:53:36: Setting setActiveController for vscode-interactive:Interactive-1.interactive
Verbose 18:53:36: Intiailize notebook communications for editor vscode-interactive:Interactive-1.interactive
Verbose 18:53:36: Resolving notebook UI Comms (resolve) for vscode-interactive:Interactive-1.interactive
Verbose 18:53:36: initialize CommonMessageCoordinator
Verbose 18:53:37: Get Custom Env Variables, Class name = m, completed in 28ms, has a truthy return value, 
Verbose 18:53:37: Get Active Interpreter, Class name = P, completed in 25ms, has a truthy return value, Arg 1: "Interactive-1.interactive"
Verbose 18:53:37: IPyWidgetMessageDispatcher.initialize
Verbose 18:53:37: Get Jupyter Paths, Class name = m, completed in 32ms, has a truthy return value, Arg 1: {"_isCancelled":false,"_emitter":null}, Return Value: []
Verbose 18:53:37: Get Kernelspec root path, Class name = m, completed in 33ms, has a truthy return value, Arg 1: {"_isCancelled":false,"_emitter":null}, Return Value: ["/usr/share/jupyter/kernels","/usr/local/share/jupyter/kernels","/home/erifr93/.local/share/jupyter/kernels"]
Verbose 18:53:37: Created and initailized CommonMessageCoordinator
Verbose 18:53:37: Attach Coordinator for vscode-interactive:Interactive-1.interactive
Verbose 18:53:37: Get Interpreters, Class name = P, completed in 33ms, has a truthy return value, Arg 1: undefined
Verbose 18:53:37: Getting Jupyter KernelSpec Root Path, Class name = m (started execution), 
Verbose 18:53:37: Get Active Interpreter, Class name = P (started execution), Arg 1: undefined
Verbose 18:53:37: Get Kernelspec root path, Class name = m (started execution), 
Verbose 18:53:37: Get Jupyter Paths, Class name = m (started execution), Arg 1: undefined
Verbose 18:53:37: Get Kernelspec root path, Class name = m (started execution), Arg 1: {"_isCancelled":false,"_emitter":null}
Verbose 18:53:37: Get Jupyter Paths, Class name = m (started execution), Arg 1: {"_isCancelled":false,"_emitter":null}
Verbose 18:53:37: Get Interpreters, Class name = P, completed in 36ms, has a truthy return value, Arg 1: undefined
Verbose 18:53:37: Getting Jupyter KernelSpec Root Path, Class name = m (started execution), 
Verbose 18:53:37: Get Active Interpreter, Class name = P (started execution), Arg 1: undefined
Verbose 18:53:37: Get Kernelspec root path, Class name = m (started execution), 
Verbose 18:53:37: Get Jupyter Paths, Class name = m (started execution), Arg 1: undefined
Verbose 18:53:37: Getting Jupyter KernelSpec Root Path, Class name = m, completed in 4ms, has a truthy return value, , Return Value: "/home/erifr93/.local/share/jupyter/kernels"
Verbose 18:53:37: Get Active Interpreter, Class name = P, completed in 3ms, has a truthy return value, Arg 1: undefined
Verbose 18:53:37: Getting Jupyter KernelSpec Root Path, Class name = m, completed in 2ms, has a truthy return value, , Return Value: "/home/erifr93/.local/share/jupyter/kernels"
Verbose 18:53:37: Get Active Interpreter, Class name = P, completed in 2ms, has a truthy return value, Arg 1: undefined
Verbose 18:53:37: Get Jupyter Paths, Class name = m, completed in 4ms, has a truthy return value, Arg 1: undefined, Return Value: []
Verbose 18:53:37: Get Jupyter Paths, Class name = m, completed in 4ms, has a truthy return value, Arg 1: {"_isCancelled":false,"_emitter":null}, Return Value: []
Verbose 18:53:37: Get Jupyter Paths, Class name = m, completed in 2ms, has a truthy return value, Arg 1: undefined, Return Value: []
Verbose 18:53:37: Get Kernelspec root path, Class name = m, completed in 5ms, has a truthy return value, , Return Value: ["/usr/share/jupyter/kernels","/usr/local/share/jupyter/kernels","/home/erifr93/.local/share/jupyter/kernels"]
Verbose 18:53:37: Get Kernelspec root path, Class name = m, completed in 4ms, has a truthy return value, Arg 1: {"_isCancelled":false,"_emitter":null}, Return Value: ["/usr/share/jupyter/kernels","/usr/local/share/jupyter/kernels","/home/erifr93/.local/share/jupyter/kernels"]
Verbose 18:53:37: Get Kernelspec root path, Class name = m, completed in 3ms, has a truthy return value, , Return Value: ["/usr/share/jupyter/kernels","/usr/local/share/jupyter/kernels","/home/erifr93/.local/share/jupyter/kernels"]
Info 18:53:37: Starting Notebook in kernel.ts id = .jvsc74a57bd0b2d30df487f2f295440af491f15be1736706da7a0a50c540ff6414a45436c63c./home/erifr93/sw/pyenv/39/python./home/erifr93/sw/pyenv/39/python.-m#ipykernel_launcher
Info 18:53:37: Creating raw notebook for vscode-interactive:Interactive-1.interactive
Info 18:53:37: Getting preferred kernel for vscode-interactive:Interactive-1.interactive
Info 18:53:37: Computing working directory vscode-interactive:Interactive-1.interactive
Verbose 18:53:37: Connecting to raw session for vscode-interactive:Interactive-1.interactive with connection .jvsc74a57bd0b2d30df487f2f295440af491f15be1736706da7a0a50c540ff6414a45436c63c./home/erifr93/sw/pyenv/39/python./home/erifr93/sw/pyenv/39/python.-m#ipykernel_launcher
Info 18:53:37: Starting raw kernel 39 (Python 3.9.5)
Info 18:53:37: installMissingDependencies ~/sw/pyenv/39/bin/python
Info 18:53:37: IPykernel found previously in this enviornment ~/sw/pyenv/39/bin/python
Verbose 18:53:37: Install Missing Dependencies, Class name = k, completed in 2ms, has a falsy return value, Return Value: undefined
Info 18:53:37: Kernel launching with ports 9010,9011,9012,9013,9014. Start port is 9000
Verbose 18:53:37: Launching kernel in kernelProcess.ts, Class name = E (started execution), Arg 1: "~/tmp/vsc_test", Arg 2: ""
Verbose 18:53:37: Launching kernel daemon, Class name = m (started execution), Arg 1: undefined, Arg 2: "~/tmp/vsc_test", Arg 3: "python395jvsc74a57bd0b2d30df487f2f295440af491f15be1736706da7a0a50c540ff6414a45436c63c", Arg 4: "~/sw/pyenv/39/bin/python"
Verbose 18:53:37: Get kernel daemon, Class name = y (started execution), Arg 1: undefined, Arg 2: undefined, Arg 3: "~/sw/pyenv/39/bin/python"
Verbose 18:53:37: Create daemon, Class name = k (started execution), Arg 1: {"daemonModule":"vscode_datascience_helpers.kernel_launcher_daemon","interpreter":{"sysPrefix":"/home/erifr93/sw/pyenv/39","envType":"Venv","envName":"39","envPath":"/home/erifr93/sw/pyenv/39","path":"/home/erifr93/sw/pyenv/39/bin/python","architecture":3,"sysVersion":"3.9.5 (default, May 29 2021, 14:32:59) \n[GCC 9.3.0]","version":{"raw":"3.9.5","major":3,"minor":9,"patch":5,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.9.5 64-bit ('39': venv)"},"dedicated":true}
Verbose 18:53:37: Create activated Env, Class name = k (started execution), Arg 1: ""
Verbose 18:53:37: Getting activated env variables, Class name = D (started execution), Arg 1: undefined, Arg 2: "~/sw/pyenv/39/bin/python", Arg 3: true
Verbose 18:53:37: Getting activated env variables ourselves, Class name = D (started execution), Arg 1: undefined, Arg 2: "~/sw/pyenv/39/bin/python"
Verbose 18:53:37: Getting activated env variables from Python, Class name = D (started execution), Arg 1: undefined, Arg 2: "~/sw/pyenv/39/bin/python"
Verbose 18:53:37: Getting activated env variables, Class name = D (started execution), Arg 1: undefined, Arg 2: "~/sw/pyenv/39/bin/python", Arg 3: true
Verbose 18:53:37: Getting activated env variables ourselves, Class name = D (started execution), Arg 1: undefined, Arg 2: "~/sw/pyenv/39/bin/python"
Verbose 18:53:37: Getting activated env variables from Python, Class name = D (started execution), Arg 1: undefined, Arg 2: "~/sw/pyenv/39/bin/python"
Info 18:53:37: Launching kernel daemon for Python 3.9.5 64-bit ('39': venv) # ~/sw/pyenv/39/bin/python
Info 18:53:37: No custom variables for Kernel as interpreter is not conda, but is Venv
Verbose 18:53:37: Getting activated env variables ourselves, Class name = D, completed in 8ms, has a falsy return value, Arg 1: undefined, Arg 2: "~/sw/pyenv/39/bin/python"
Verbose 18:53:37: Getting activated env variables ourselves, Class name = D, completed in 7ms, has a falsy return value, Arg 1: undefined, Arg 2: "~/sw/pyenv/39/bin/python"
Verbose 18:53:37: Got env vars ourselves faster, but empty ~/sw/pyenv/39/bin/python
Verbose 18:53:37: Got env vars ourselves faster, but empty ~/sw/pyenv/39/bin/python
Verbose 18:53:37: Got env vars ourselves ~/sw/pyenv/39/bin/python in 10ms
Verbose 18:53:37: Getting activated env variables from Python, Class name = D, completed in 10ms, has a truthy return value, Arg 1: undefined, Arg 2: "~/sw/pyenv/39/bin/python"
Verbose 18:53:37: Got env vars ourselves ~/sw/pyenv/39/bin/python in 9ms
Verbose 18:53:37: Getting activated env variables from Python, Class name = D, completed in 9ms, has a truthy return value, Arg 1: undefined, Arg 2: "~/sw/pyenv/39/bin/python"
Verbose 18:53:37: Got env vars with python ~/sw/pyenv/39/bin/python in 10ms
Verbose 18:53:37: Got env vars with python ~/sw/pyenv/39/bin/python in 9ms
Verbose 18:53:37: Getting activated env variables, Class name = D, completed in 10ms, has a truthy return value, Arg 1: undefined, Arg 2: "~/sw/pyenv/39/bin/python", Arg 3: true
Verbose 18:53:37: Getting activated env variables, Class name = D, completed in 11ms, has a truthy return value, Arg 1: undefined, Arg 2: "~/sw/pyenv/39/bin/python", Arg 3: true
Verbose 18:53:37: Create activated Env, Class name = k, completed in 12ms, has a truthy return value, Arg 1: ""
Info 18:53:37: Creating daemon process for ~/sw/pyenv/39/bin/python with env variables count 86
Info 18:53:37: Process Execution: > ~/sw/pyenv/39/bin/python -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> ~/sw/pyenv/39/bin/python -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
Verbose 18:53:37: Loading kernelspec from ~/sw/pyenv/39/share/jupyter/kernels/python3/kernel.json for ~/sw/pyenv/39/bin/python
Verbose 18:53:37: Daemon is alive
Verbose 18:53:37: Create daemon, Class name = k, completed in 158ms, has a truthy return value, Arg 1: {"daemonModule":"vscode_datascience_helpers.kernel_launcher_daemon","interpreter":{"sysPrefix":"/home/erifr93/sw/pyenv/39","envType":"Venv","envName":"39","envPath":"/home/erifr93/sw/pyenv/39","path":"/home/erifr93/sw/pyenv/39/bin/python","architecture":3,"sysVersion":"3.9.5 (default, May 29 2021, 14:32:59) \n[GCC 9.3.0]","version":{"raw":"3.9.5","major":3,"minor":9,"patch":5,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.9.5 64-bit ('39': venv)"},"dedicated":true}
Verbose 18:53:37: Get kernel daemon, Class name = y, completed in 160ms, has a truthy return value, Arg 1: undefined, Arg 2: undefined, Arg 3: "~/sw/pyenv/39/bin/python"
Info 18:53:37: Starting kernel from scratch
Verbose 18:53:37: Python Daemon (pid: 13470): Execute rpc method exec_module in DS Daemon
Verbose 18:53:37: Python Daemon (pid: 13470): Execute rpc method exec_module from /home/erifr93/sw/pyenv/39/bin/python
Verbose 18:53:37: Python Daemon (pid: 13470): Exec module in DS Kernel Launcher Daemon ipykernel_launcher with args ['--ip=127.0.0.1', '--stdin=9013', '--control=9011', '--hb=9010', '--Session.signature_scheme="hmac-sha256"', '--Session.key=b"cf49b15b-5038-4bb3-be78-e4e0cf7f6ae3"', '--shell=9012', '--transport="tcp"', '--iopub=9014', '--f=/tmp/tmp-13273IS2sAD1rc5ry.json']
Verbose 18:53:37: Python Daemon (pid: 13470): Exec in DS Kernel Launcher Daemon (observable) ipykernel_launcher with args ['--ip=127.0.0.1', '--stdin=9013', '--control=9011', '--hb=9010', '--Session.signature_scheme="hmac-sha256"', '--Session.key=b"cf49b15b-5038-4bb3-be78-e4e0cf7f6ae3"', '--shell=9012', '--transport="tcp"', '--iopub=9014', '--f=/tmp/tmp-13273IS2sAD1rc5ry.json']
Verbose 18:53:37: Python Daemon (pid: 13470): Exec in DS Kernel Launcher Daemon (observable) ['/home/erifr93/sw/pyenv/39/bin/python', '-m', 'ipykernel_launcher', '--ip=127.0.0.1', '--stdin=9013', '--control=9011', '--hb=9010', '--Session.signature_scheme="hmac-sha256"', '--Session.key=b"cf49b15b-5038-4bb3-be78-e4e0cf7f6ae3"', '--shell=9012', '--transport="tcp"', '--iopub=9014', '--f=/tmp/tmp-13273IS2sAD1rc5ry.json']
Verbose 18:53:37: Python Daemon (pid: 13470): Exec in DS Kernel Launcher Daemon (observable)
Verbose 18:53:37: Python Daemon (pid: 13470): Kernel launched, with PID 13472
Verbose 18:53:37: Python Daemon (pid: 13470): Waiting for Kernel to die 13472
Verbose 18:53:37: Launching kernel daemon, Class name = m, completed in 171ms, has a truthy return value, Arg 1: undefined, Arg 2: "~/tmp/vsc_test", Arg 3: "python395jvsc74a57bd0b2d30df487f2f295440af491f15be1736706da7a0a50c540ff6414a45436c63c", Arg 4: "~/sw/pyenv/39/bin/python", Return Value: <Return value cannot be serialized for logging>
Verbose 18:53:37: Launching kernel in kernelProcess.ts, Class name = E, completed in 173ms, has a truthy return value, Arg 1: "~/tmp/vsc_test", Arg 2: ""
Verbose 18:53:37: Hiding default kernel spec Python 3 (ipykernel), python
Verbose 18:53:37: Hiding default kernel spec Python 3 (ipykernel), python
Info 18:53:37: Registering dummy command feature
Verbose 18:53:37: Registering commtarget jupyter.widget
Verbose 18:53:37: IPyWidgetMessageDispatcher.initialize
Verbose 18:53:37: KernelProcess output: Content-Length: 361
Content-Type: application/vscode-jsonrpc; charset=utf8

{"jsonrpc": "2.0", "method": "log", "params": {"level": "INFO", "msg": "write to stderr: /home/erifr93/sw/pyenv/39/lib/python3.9/site-packages/traitlets/traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '\"hmac-sha256\"' if you require traitlets >=5.\n", "pid": 13470}}
Verbose 18:53:37: Python Daemon (pid: 13470): write to stderr: /home/erifr93/sw/pyenv/39/lib/python3.9/site-packages/traitlets/traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.

Verbose 18:53:37: KernelProcess output: Content-Length: 336
Content-Type: application/vscode-jsonrpc; charset=utf8

{"jsonrpc": "2.0", "method": "output", "params": {"source": "stderr", "out": "/home/erifr93/sw/pyenv/39/lib/python3.9/site-packages/traitlets/traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '\"hmac-sha256\"' if you require traitlets >=5.\n"}}Content-Length: 115
Content-Type: application/vscode-jsonrpc; charset=utf8

{"jsonrpc": "2.0", "method": "log", "params": {"level": "INFO", "msg": "write to stderr:   warn(\n", "pid": 13470}}Content-Length: 90
Content-Type: application/vscode-jsonrpc; charset=utf8

{"jsonrpc": "2.0", "method": "output", "params": {"source": "stderr", "out": "  warn(\n"}}Content-Length: 373
Content-Type: application/vscode-jsonrpc; charset=utf8

{"jsonrpc": "2.0", "method": "log", "params": {"level": "INFO", "msg": "write to stderr: /home/erifr93/sw/pyenv/39/lib/python3.9/site-packages/traitlets/traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'cf49b15b-5038-4bb3-be78-e4e0cf7f6ae3' instead of 'b\"cf49b15b-5038-4bb3-be78-e4e0cf7f6ae3\"'.\n", "pid": 13470}}Content-Length: 348
Content-Type: application/vscode-jsonrpc; charset=utf8

{"jsonrpc": "2.0", "method": "output", "params": {"source": "stderr", "out": "/home/erifr93/sw/pyenv/39/lib/python3.9/site-packages/traitlets/traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'cf49b15b-5038-4bb3-be78-e4e0cf7f6ae3' instead of 'b\"cf49b15b-5038-4bb3-be78-e4e0cf7f6ae3\"'.\n"}}Content-Length: 115
Content-Type: application/vscode-jsonrpc; charset=utf8

{"jsonrpc": "2.0", "method": "log", "params": {"level": "INFO", "msg": "write to stderr:   warn(\n", "pid": 13470}}Content-Length: 90
Content-Type: application/vscode-jsonrpc; charset=utf8

{"jsonrpc": "2.0", "method": "output", "params": {"source": "stderr", "out": "  warn(\n"}}
Warn 18:53:37: StdErr from Kernel Process /home/erifr93/sw/pyenv/39/lib/python3.9/site-packages/traitlets/traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.

Verbose 18:53:37: Python Daemon (pid: 13470): write to stderr:   warn(

Warn 18:53:37: StdErr from Kernel Process   warn(

Verbose 18:53:37: Python Daemon (pid: 13470): write to stderr: /home/erifr93/sw/pyenv/39/lib/python3.9/site-packages/traitlets/traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'cf49b15b-5038-4bb3-be78-e4e0cf7f6ae3' instead of 'b"cf49b15b-5038-4bb3-be78-e4e0cf7f6ae3"'.

Warn 18:53:38: StdErr from Kernel Process /home/erifr93/sw/pyenv/39/lib/python3.9/site-packages/traitlets/traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'cf49b15b-5038-4bb3-be78-e4e0cf7f6ae3' instead of 'b"cf49b15b-5038-4bb3-be78-e4e0cf7f6ae3"'.

Verbose 18:53:38: Python Daemon (pid: 13470): write to stderr:   warn(

Warn 18:53:38: StdErr from Kernel Process   warn(

Info 18:53:38: Raw session started and connected
Started kernel 39 (Python 3.9.5)
Info 18:53:38: Finished connecting 58bd132f-89c9-4144-b179-138a76754e20
Info 18:53:38: UpdateWorkingDirectoryAndPath in Kernel
Info 18:53:38: Executing (status idle) silently Code = %config Completer.use_jedi = False
Info 18:53:38: Executing silently Code (completed) = %config Completer.use_jedi = False
Info 18:53:38: Executing (status idle) silently Code = %config InlineBackend.figure_formats = ['png']
Info 18:53:38: Executing silently Code (completed) = %config InlineBackend.figure_formats = ['png']
Info 18:53:38: Executing (status idle) silently Code = import sys\nprint(sys.executable)
Info 18:53:38: Executing silently Code (completed) = import sys\nprint(sys.executable)
Info 18:53:38: Waiting for idle on (kernel): 73d9a265-6627-4fbf-9df6-f3d2c45070be -> idle
Info 18:53:38: Finished waiting for idle on (kernel): 73d9a265-6627-4fbf-9df6-f3d2c45070be -> idle
Verbose 18:53:38: IPyWidgetMessageDispatcher.initialize
Info 18:53:38: IPyWidgetScriptSource.initialize
Verbose 18:53:38: IPyWidgetMessageDispatcher.initialize
Verbose 18:53:38: IPyWidgetMessageDispatcher.initialize
Info 18:53:41: Jupyter completions for % at pos 0:1 with trigger: %
   %%!,%%HTML,%%SVG,%alias,%alias_magic,%autoawait,%autocall,%automagic,%autosave,%%bash,%bookmark,%%capture,%cat,%cd,%clear,%colors,%conda,%config,%connect_info,%cp,%debug,%%debug,%dhist,%dirs,%doctest_mode,%ed,%edit,%env,%%file,%gui,%hist,%history,%%html,%%javascript,%%js,%killbgscripts,%%latex,%ldir,%less,%lf,%lk,%ll,%load,%load_ext,%loadpy,%logoff,%logon,%logstart,%logstate,%logstop,%ls,%lsmagic,%lx,%macro,%magic,%man,%%markdown,%matplotlib,%mkdir,%more,%mv,%notebook,%page,%pastebin,%pdb,%pdef,%pdoc,%%perl,%pfile,%pinfo,%pinfo2,%pip,%popd,%pprint,%precision,%prun,%%prun,%psearch,%psource,%pushd,%pwd,%pycat,%pylab,%%pypy,%%python,%%python2,%%python3,%qtconsole,%quickref,%recall,%rehashx,%reload_ext,%rep,%rerun,%reset,%reset_selective,%rm,%rmdir,%%ruby,%run,%save,%sc,%%script,%set_env,%%sh,%store,%%svg,%sx,%%sx,%system,%%system,%tb,%time,%%time,%timeit,%%timeit,%unalias,%unload_ext,%who,%who_ls,%whos,%%writefile,%xdel,%xmode
Info 18:53:41: Jupyter results for % at pos 0:1 with trigger: %
   %%!,%%HTML,%%SVG,%alias,%alias_magic,%autoawait,%autocall,%automagic,%autosave,%%bash,%bookmark,%%capture,%cat,%cd,%clear,%colors,%conda,%config,%connect_info,%cp,%debug,%%debug,%dhist,%dirs,%doctest_mode,%ed,%edit,%env,%%file,%gui,%hist,%history,%%html,%%javascript,%%js,%killbgscripts,%%latex,%ldir,%less,%lf,%lk,%ll,%load,%load_ext,%loadpy,%logoff,%logon,%logstart,%logstate,%logstop,%ls,%lsmagic,%lx,%macro,%magic,%man,%%markdown,%matplotlib,%mkdir,%more,%mv,%notebook,%page,%pastebin,%pdb,%pdef,%pdoc,%%perl,%pfile,%pinfo,%pinfo2,%pip,%popd,%pprint,%precision,%prun,%%prun,%psearch,%psource,%pushd,%pwd,%pycat,%pylab,%%pypy,%%python,%%python2,%%python3,%qtconsole,%quickref,%recall,%rehashx,%reload_ext,%rep,%rerun,%reset,%reset_selective,%rm,%rmdir,%%ruby,%run,%save,%sc,%%script,%set_env,%%sh,%store,%%svg,%sx,%%sx,%system,%%system,%tb,%time,%%time,%timeit,%%timeit,%unalias,%unload_ext,%who,%who_ls,%whos,%%writefile,%xdel,%xmode
Info 18:53:43: Execute Cells request 1
Info 18:53:43: Execute Cell 1 vscode-interactive:Interactive-1.interactive
Info 18:53:43: Cell 1 executed with state Success
Info 18:53:45: Execute Cells request 2
Info 18:53:45: Execute Cell 2 vscode-interactive:Interactive-1.interactive
Info 18:53:45: Cell 2 executed with state Success
Info 18:53:48: Execute Cells request 3
Info 18:53:48: Execute Cell 3 vscode-interactive:Interactive-1.interactive
Info 18:55:27: Loading webview. View is notset
Info 18:55:27: Loading web view...
Info 18:55:27: Webview panel created.
Info 18:55:27: Web view react rendered
Info 18:55:27: Executing (status idle) silently Code = # Query Jupyter server for the info about a dataframe\nimport json as _VSCODE_json\nimport builtins as
Info 18:55:27: Executing (status idle) silently Code = # Query Jupyter server for the info about a dataframe\nimport json as _VSCODE_json\nimport builtins as
Info 18:55:27: Cell 3 executed with state Success
Info 18:55:27: Executing silently Code (completed) = # Query Jupyter server for the info about a dataframe\nimport json as _VSCODE_json\nimport builtins as
Info 18:55:27: Executing (status idle) silently Code = _rwho_ls = %who_ls\nprint(_VSCODE_getVariableTypes(_rwho_ls))
Info 18:55:27: Executing silently Code (completed) = # Query Jupyter server for the info about a dataframe\nimport json as _VSCODE_json\nimport builtins as
Info 18:55:27: Executing (status idle) silently Code = _rwho_ls = %who_ls\nprint(_VSCODE_getVariableTypes(_rwho_ls))
Info 18:55:27: Executing (status busy) silently Code = _rwho_ls = %who_ls\nprint(_VSCODE_getVariableTypes(_rwho_ls))
Info 18:55:27: Executing silently Code (completed) = _rwho_ls = %who_ls\nprint(_VSCODE_getVariableTypes(_rwho_ls))
Info 18:55:27: Executing silently Code (completed) = _rwho_ls = %who_ls\nprint(_VSCODE_getVariableTypes(_rwho_ls))
Info 18:55:27: Executing silently Code (completed) = _rwho_ls = %who_ls\nprint(_VSCODE_getVariableTypes(_rwho_ls))
Info 18:55:27: Searching for token colors ...
Info 18:55:27: Attempting search for colors ...
Info 18:55:27: Loading colors from /usr/share/code-insiders/resources/app/extensions/theme-defaults/themes/dark_plus.json ...
Info 18:55:27: Attempting search for colors ...
Info 18:55:27: Loading base colors from /usr/share/code-insiders/resources/app/extensions/theme-defaults/themes/dark_plus.json ...
Info 18:55:27: Using colors to generate CSS ...
Info 18:56:29: Searching for token colors ...
Info 18:56:29: Attempting search for colors ...
Info 18:56:29: Loading colors from /usr/share/code-insiders/resources/app/extensions/theme-defaults/themes/dark_plus.json ...
Info 18:56:29: Executing (status idle) silently Code = _rwho_ls = %who_ls\nprint(_VSCODE_getVariableTypes(_rwho_ls))
Info 18:56:29: Executing (status idle) silently Code = _rwho_ls = %who_ls\nprint(_VSCODE_getVariableTypes(_rwho_ls))
Info 18:56:29: Executing (status idle) silently Code = _rwho_ls = %who_ls\nprint(_VSCODE_getVariableTypes(_rwho_ls))
Info 18:56:29: Executing (status idle) silently Code = _rwho_ls = %who_ls\nprint(_VSCODE_getVariableTypes(_rwho_ls))
Info 18:56:29: Executing silently Code (completed) = _rwho_ls = %who_ls\nprint(_VSCODE_getVariableTypes(_rwho_ls))
Info 18:56:29: Attempting search for colors ...
Info 18:56:29: Loading base colors from /usr/share/code-insiders/resources/app/extensions/theme-defaults/themes/dark_plus.json ...
Info 18:56:29: Executing silently Code (completed) = _rwho_ls = %who_ls\nprint(_VSCODE_getVariableTypes(_rwho_ls))
Info 18:56:29: Executing silently Code (completed) = _rwho_ls = %who_ls\nprint(_VSCODE_getVariableTypes(_rwho_ls))
Info 18:56:29: Using colors to generate CSS ...
Info 18:56:29: Executing silently Code (completed) = _rwho_ls = %who_ls\nprint(_VSCODE_getVariableTypes(_rwho_ls))```
DonJayamanne commented 2 years ago

@faultdiagnosistoolbox Yes, I don't expect that to work, Please try %matplotlib widget

faultdiagnosistoolbox commented 2 years ago

OK, that is unfortunate but it has worked before (and is also working now when I downgrade the Jupyter extension version)?

In any case, thanks for investigating the issue. Unfortunately this (regrettably) makes me have to chose another tool than VSCode since the widget backend is not what I'm looking for (it is working though).

DonJayamanne commented 2 years ago

OK, that is unfortunate but it has worked before (and is also working now when I downgrade the Jupyter extension version)?

What version have you tried, I tried this at my end and the plot didn't work (see here https://github.com/microsoft/vscode-jupyter/issues/8322#issuecomment-978500903). I.e. plot window (external window app) is blank & I can run cells.

faultdiagnosistoolbox commented 2 years ago

I'm using VSCode version 1.62.3 and Jupyter extension v2021.9.1101343141. Everything else is up-to-date as far as I can tell. Then I can run %matplotlib and interactively run commands, produce plots, etc. Currently I'm sitting on a Mac, but I have the exact same experience on a Linux (Ubuntu 20.04) laptop. I've not had the chance to try on a Windows machine.

Edit: I saw now that you asked for version of matplotlib earlier in the thread. I'm currently on 3.5.0 (running python 3.9). Edit 2: I don't know if it matters, but I am running the Qt5Agg matplotlib backend (%matplotlib qt5, requires pyqt5 package)

rchiodo commented 2 years ago

We might want to consider reverting this change and try it out: https://github.com/microsoft/vscode-jupyter/pull/7959/commits/545b139ff1f4c6935fc5f63173374fac2e331bcd

rchiodo commented 2 years ago

Going to try this today to see if I can get qt5 to work.

rchiodo commented 2 years ago

This works fine for me. See GIF: qt5

I got this working by

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib qt5
x = np.linspace(0, 20, 200)
plt.plot(x, np.sin(x))
plt.show()
rchiodo commented 2 years ago

So if it's not working, it may be a qt5/matlplotlib issue.

rchiodo commented 2 years ago

Verification steps:

faultdiagnosistoolbox commented 2 years ago

I have attached a gif that illustrates the problem for me. I am running this on an Ubuntu machine but it works exactly the same on my Mac. If I downgrade the jupyter extension to v2021.9.1101343141 it all works.

The only difference to your set of instructions is that I do a 1+1 command after (I think any instructions will do to illustrate). vscode_problems

rchiodo commented 2 years ago

@faultdiagnosistoolbox it looks like you're not using conda. The set of packages installed likely has a big impact on this. Running other code after the plot works fine for me using conda, but not with a venv. I recommend using the yml file I included above to create an environment where this works (or maybe use it to compare against what's in your venv).

faultdiagnosistoolbox commented 2 years ago

It is true, I don't normally use conda. Do I understand correctly that you get the same behavior as me in venv but it works in a conda environment?

In my example above I created a minimal venv with only the required packages (all latest versions) to excite the problem. I will try to create a virtual environment based on the yml-file you created to see if there are any changes in behavior.

rchiodo commented 2 years ago

Do I understand correctly that you get the same behavior as me in venv but it works in a conda environment?

For me if I create a virtual env from scratch, the creation of the plot hangs the kernel forever (so not exact same results).

faultdiagnosistoolbox commented 2 years ago

I have no conda installation to experiment with (I could install if that is helpful).

I do think think that a minimal package installation is useful for deugging, but I installed all package according to the yml-file provided (except packages that were not pypi available on linux). No difference, same exact problem.

It do seems like venv/cpython is key to excite the problem. I don't know enough about the differences between conda/cpython+venv here to help I'm sorry to say.

rchiodo commented 2 years ago

Unfortunately, I think the end result is that QT5 or other backends are just not supported/use at your own risk. We don't really have the time to try and test every combination of python environments where it might work.

rchiodo commented 2 years ago

For my testing, the ipympl library was key to get it to work.

faultdiagnosistoolbox commented 2 years ago

I fully understand that the combinations of packages, backends, python distributions etc makes this complicated. What did you do with ipyml to get it to work?

I would be sad to have to leave VSCode, I like it in many ways, but this is a show-stopper for me unfortunately. I just wonder if my REPL use-case is that fringe? It is the python distribution from python.org after all with the standard (I think) interactive backend for matplotlib. If I use the tkinter backend, I experience the exact same problem.

In any case, I sincerely thank you for your efforts and energy trying to help me with this.

rchiodo commented 2 years ago

What did you do with ipyml to get it to work?

When I was building/testing with the conda environment, I first used %matplotlib widget to verify that the environment was correct. %matplotlib widget requires the python package ipympl. When I tried to repro a second time, the conda environment didn't work either until I also added ipympl. I haven't the foggiest why. I haven't debugged the kernel to see why it gets stuck in the venv or when I don't have ipympl.

What is about the QT5 backend that you need? Perhaps we can solve your problem a different way.

faultdiagnosistoolbox commented 2 years ago

It's not really the QT5 backend that is important, for example the tk works just as fine. What I do need is to have all my plots in external windows where I can zoom, resize etc. In my workflow I often have a number of plot windows open (with ID:s so that when I rerun code the plots get updated and stays in the same position on my screen). All works fine from a pure ipython prompt.

rchiodo commented 2 years ago

Is the key part having it in another window? As in if it was in another VS code tab that's too much in the way?

We discussed implementing a plotting window using the %matplotlib widget that you could do that with, but it would have to be in another tab in VS code.

faultdiagnosistoolbox commented 2 years ago

(I hope I don't come across as whiny and overly picky; not my intention at all)

For me and my workflow, external windows is key since I work with multiple monitors and typically populate one screen with plots and another screen with code. It is also essential that I can see all plots at once since I compare end evaluate them against each other. I guess some of my preferences comes from my old Matlab days, but this is how I'm efficient.

rchiodo commented 2 years ago

No no worries. This kind of feedback is golden. It's much appreciated.

VS code won't likely support multiple monitors for some time. But this is a good way to help push that.

And now I understand why QT5 is so crucial for your workflow.

faultdiagnosistoolbox commented 2 years ago

Also on a laptop, with only one screen, external windows is equally useful for me. So it is not entirely a multiple-monitor issue.

pgA3D commented 2 years ago

I concur with @faultdiagnosistoolbox, my workflow is similar and this bug is a show stopper. Those are the 3 essentials for my workflow that the Qt5 backend (and probably others) provides :

rchiodo commented 2 years ago

@pgA3D all 3 of those would be possible inside of VS code. The 'separate' window would just be limited to another tab.

We kinda support this, but it's rather limited:

image

If we expanded our current plotviewer to be more like the QT control (but still be inside VS code), would that be usable?

@faultdiagnosistoolbox really needed the windows outside of VS code. That's a lot harder to accomplish. But improving our plotviewer should be pretty easy.

faultdiagnosistoolbox commented 2 years ago

First I want to say I haven't the insight to realize all problems but what I'm looking for is what were available before Jupyter extension v2021.9.1101343141. Then, it worked as in current versions of, e.g., PyCharm where it works perfectly. What I'm looking for is similarly to what I would get if I pasted to an ipython prompt, directly utilizing the matplotlib backends and no tight integration of the plot windows into the IDE. This I get if I do %matplotlib tk or %matplotlib qt in PyCharm (on with non-recent Jupyter extensions).

Integration of plots in the IDE in tabs is not a solution for me unfortunately.

rchiodo commented 2 years ago

I did some more digging. It works for me ONLY if I do this first:

  1. %matplotlib widget
  2. do something to get a plot
  3. restart the kernel
  4. %matplotlib qt5

The plot we render in step 2 establishes a comm channel to the kernel. This channel goes away in step 3, but the javascript listening to events is still there in step 4. Somehow this makes it work.

I'm reopening because this might be fixable.

Can somebody else try those steps?

rchiodo commented 2 years ago

The reason this might have been working with older versions is because our webview might have always loaded the extra javascript code. The new VS code based UI will only load it when a widget gets rendered.

rchiodo commented 2 years ago

Oh and @DonJayamanne in case you're curious, I did revert that perf change for widget support. It had no effect. I have to load the widget for a plot to get it to work. It might also be something that widget leaves behind that makes it work.

faultdiagnosistoolbox commented 2 years ago

I tried the steps suggested by @rchiodo and unfortunately I don't get it to work. I tried with tk and qt backend.

What happens is that when I try to open the plot the second time, after %matplotlib qt5, it freezes (or more acurately it produces a plot after about 50 seconds).

Edit: after the successful attempt by pgAD3 I gave it another try. I can swear that I did the same procedure now but now I got it to kind of work. I got a new plot window the second time; but trying to do a simple 1+1 in the console made it freeze again.

pgA3D commented 2 years ago

I tried as well the steps from @rchiodo , and it works on my side.

I do %matplotlib widget import matplotlib.pyplot as plt plt.figure()

then restart the kernel

%matplotlib qt5 import matplotlib.pyplot as plt plt.figure()

And I get a figure instantaneously, no hanging afterward.

Groberts93 commented 2 years ago

I can reproduce the steps too. I note that also typing any character in the interactive command line has the same "unblocking" effect on previous cells. This is on native Ubuntu 20.04.

@rchiodo with regard to your question in the other thread about my use case -- my work is dependent on a library (MNE-Python) which requires the Qt backend for interactive plotting of large electrophys datasets. This setup allows me to plot my own matplotlib figures in the same environment with minimal friction, use the full screen space for large composite plots etc.

My hard requirement is that I can use the MNE data viewer, which is unfortunately tied to Qt for now. My feature preference is plotting in separate windows.

At present I'm using an old version of the Jupyter extension (v2021.10.1001393861) which works fine with qt magics. I can continue to work with this setup for the time being.

rchiodo commented 2 years ago

More investigation notes:

Running this code will also make it work (with or without restarting the kernel)

import ipywidgets as widgets
widgets.IntSlider()

So it has something to do with us activating our widget manager.

faultdiagnosistoolbox commented 2 years ago

I can confirm that activating the widget manager made it work better also for me. First I thought it worked as desired, but the problems re-occurred after a few plotting commands. I did

  1. activate widget manager
  2. %matplotlib qt5
  3. necessary imports and then plot a sinus-curve

Then iterating 3 (or other sinple 1+1 commands) makes it freeze for me, usually the second time but it varies.

bermeom commented 2 years ago

I did anything, and it doesn't work, so I have no choice but to install an old version (September version - 1.61.2). Thanks @faultdiagnosistoolbox and @gonghenghai, for bringing up the issue and I hope the vscode-jupyter team will consider fixing this issue soon as this feature is very important to everyone who works analyzing data (data scientist, data analyst, data engineer) .

rchiodo commented 2 years ago

I've submitted what I think is a fix. Hopefully it will come out in our 'prerelease/insiders' build tonight (in about 7 hours from when I write this comment)

If anybody can try it, that'd be great.

pgA3D commented 2 years ago

thanks @rchiodo I got the pre-release v2022.1.1001666841 from the VScode extension tab (is that the correct one?), and it seems to work perfectly fine.

rchiodo commented 2 years ago

Yep that's the one. Glad to hear it's working.

rchiodo commented 2 years ago

Closing as fixed.

Verification steps:

  1. Open python file
  2. Run a cell with: %matplotlib qt5 (might require installing Pyqt5)
  3. Do normal stuff after that
  4. Run a matplotlib plot. It should open a separate QT window like so:

image

  1. Run a bunch of code after that and make sure you can still talk to the kernel
  2. Try opening more plots.
faultdiagnosistoolbox commented 2 years ago

I can confirm that it also works for me. Thank you!

bermeom commented 2 years ago

Yes, it is working !! Thank you.

Groberts93 commented 2 years ago

As others have said, this is working now. Thank you very much for fixing this.

karahanyilmazer commented 2 years ago

It also works for me. Thank you very much, this is of huge help!

DonJayamanne commented 11 months ago

@faultdiagnosistoolbox @bermeom @Groberts93 @karahanyilmazer @pgA3D We're making a few changes to this part of the code and would like to verify that it does not break your usage of qt5. I have tested this at my end and it works as expected.

Thank you, and really appreciate your help in this space. ms-toolsai-jupyter-insiders.vsix.zip