Plot windows with qt4 or qt5 as backend for the IPython console run very slowly.
See original GitHub issueIssue Report Checklist
- [ x] Searched the issues page for similar reports
- [x ] Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
- [x ] Reproduced the issue after updating with
conda update spyder
(orpip
, if not using Anaconda) - [x ] Could not reproduce inside
jupyter qtconsole
(if console-related) - [x ] Tried basic troubleshooting (if a bug/error)
- [x ] Restarted Spyder
- [ x] Reset preferences with
spyder --reset
- [ x] Reinstalled the latest version of Anaconda
- [x ] Tried the other applicable steps from the Troubleshooting Guide
- [x ] Completed the Problem Description, Steps to Reproduce and Version sections below
Problem Description
When I use either qt4 or qt5 as the backend for the IPython console, the plot that opens up in a new window runs extremely slowly. This is different than other bug reports I have seen because the kernel itself works fine for me.
I think this has to do with version 5 of ipykernel, because I downgraded to ipykernel 4.10.0 (and downgraded to Spyder 3) and the plot window worked fine. Then I upgraded to ipykernel 5 (while still using Spyder 3) and the plot windows became slow again.
What steps reproduce the problem?
- Set qt4 or qt5 as the backend.
- Try to plot anything. For this I just plotted a sin curve:
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0, 4*np.pi, num=1000)
y = np.sin(x)
plt.plot(x, y)
What is the expected output? What do you see instead?
I expect a window which will respond to the cursor position in real time – instead it freezes up and takes several seconds to respond, even when exiting out.
Versions
- Spyder version: 4.1.4
- Python version: 3.7.7 64-bit
- Qt version: 5.9.6
- PyQt version: 5.9.2
- Operating System name/version: Windows 10 64-bit
Dependencies
# Mandatory:
atomicwrites >=1.2.0 : 1.4.0 (OK)
chardet >=2.0.0 : 3.0.4 (OK)
cloudpickle >=0.5.0 : 1.5.0 (OK)
diff_match_patch >=20181111 : 20200713 (OK)
intervaltree : None (OK)
IPython >=4.0 : 7.16.1 (OK)
jedi =0.17.1 : 0.17.1 (OK)
nbconvert >=4.0 : 5.6.1 (OK)
numpydoc >=0.6.0 : 1.1.0 (OK)
paramiko >=2.4.0 : 2.7.1 (OK)
parso =0.7.0 : 0.7.0 (OK)
pexpect >=4.4.0 : 4.8.0 (OK)
pickleshare >=0.4 : 0.7.5 (OK)
psutil >=5.3 : 5.7.0 (OK)
pygments >=2.0 : 2.6.1 (OK)
pylint >=1.0 : 2.5.3 (OK)
pyls >=0.34.0;<1.0.0 : 0.34.1 (OK)
qdarkstyle >=2.8 : 2.8.1 (OK)
qtawesome >=0.5.7 : 0.7.2 (OK)
qtconsole >=4.6.0 : 4.7.5 (OK)
qtpy >=1.5.0 : 1.9.0 (OK)
rtree >=0.8.3 : 0.9.4 (OK)
sphinx >=0.6.6 : 3.1.2 (OK)
spyder_kernels >=1.9.2;<1.10.0 : 1.9.2 (OK)
watchdog : None (OK)
zmq >=17 : 19.0.1 (OK)
# Optional:
cython >=0.21 : None (OK)
matplotlib >=2.0.0 : 3.2.2 (OK)
numpy >=1.7 : 1.18.5 (OK)
pandas >=0.13.1 : 1.0.5 (OK)
scipy >=0.17.0 : 1.5.0 (OK)
sympy >=0.7.3 : 1.6.1 (OK)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:13 (5 by maintainers)
Top Results From Across the Web
python console with iPython very slow with qt4 backend on ...
Hi, With python 3.5 and python 3.6, I've noticed a considerable slow-down in the python console when using qt4 in ipython like this:...
Read more >Show plots in new window instead of inline (not answered by ...
Go to Tools > preferences > IPython console > Graphics > Graphics backend > Backend: Automatic After this don't forget to restart the...
Read more >IPython's magic functions — Mastering JupyterLab
In a line-oriented client (the terminal or Qt console IPython), starting a new input with %% will automatically enter cell mode, and IPython...
Read more >backend qtagg is interactive backend - You.com | The search engine ...
I was getting no error output from the script running and furthermore the plot.show() function wasn't even blocking the console. plot.savefig() worked ...
Read more >Matplotlib.pdf
fig.suptitle('No axes on this figure') # Add a title so we know which it ... This backend can be activated in IPython with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
ipykernel 5.3.4 packages are now available in
defaults
Totally right @lucasmyers97 I think
ipykernel 5.3.4
is not yet available in the default conda channel. For now, I suggest to work with the version 5.3.2 (the work around found) and try again to updateipykernel
when the package is uploaded (probably in a couple of days). Sorry for the inconvenience 😕