I updated to MacOS Big Sur yesterday, and every since, typing in the editor has come with a great deal of latency - keystrokes occur nearly 0.5 seconds before characters appear in the editor. Interestingly, this issue is restricted to the editor - typing is fine in the console and in this issue reporter window.
Typing is slow whether in a brand new file or an existing one.
I tried updating spyder via conda, updating all of my other packages via conda update --all, and restarting my Mac multiple times.
# Mandatory:
applaunchservices >=0.1.7 : 0.2.1 (OK)
atomicwrites >=1.2.0 : 1.4.0 (OK)
chardet >=2.0.0 : 3.0.4 (OK)
cloudpickle >=0.5.0 : 1.6.0 (OK)
diff_match_patch >=20181111 : 20200713 (OK)
intervaltree : None (OK)
IPython >=4.0 : 7.19.0 (OK)
jedi =0.17.1 : 0.17.1 (OK)
nbconvert >=4.0 : 6.0.7 (OK)
numpydoc >=0.6.0 : 1.1.0 (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.2 (OK)
pygments >=2.0 : 2.7.2 (OK)
pylint >=1.0 : 2.6.0 (OK)
pyls >=0.34.0;<1.0.0 : 0.35.1 (OK)
qdarkstyle >=2.8 : 2.8.1 (OK)
qtawesome >=0.5.7 : 1.0.1 (OK)
qtconsole >=4.6.0 : 4.7.7 (OK)
qtpy >=1.5.0 : 1.9.0 (OK)
rtree >=0.8.3 : 0.9.4 (OK)
sphinx >=0.6.6 : 3.2.1 (OK)
spyder_kernels >=1.9.4;<1.10.0 : 1.9.4 (OK)
watchdog : None (OK)
zmq >=17 : 19.0.2 (OK)
# Optional:
cython >=0.21 : 0.29.21 (OK)
matplotlib >=2.0.0 : 3.3.2 (OK)
numpy >=1.7 : 1.19.2 (OK)
pandas >=0.13.1 : 1.1.3 (OK)
scipy >=0.17.0 : 1.5.2 (OK)
sympy >=0.7.3 : 1.6.2 (OK)
# Spyder plugins:
spyder_notebook : 0.3.0 (OK)
Similar issue here. For me, besides the typing latency, it also becomes very slow when switching to another file tab after updating to Big Sur. It took around 3 to 4 seconds for this.
I completely re-installed miniconda and re-installed Spyder into a new conda environment for a few times, but the issue persists.
I noticed a similar slowness when switching between files, also.
After updating to Big Sur today I began to experience the same issue on my iMac 27", 2020, however, strangely not on my MacBook Air 13", 2017.
In addition to the behaviour outlined above, I would add that within the Editor, it is also extremely slow to highlight text.
Same issue here :(
Me too. I've should waiting before updating my Mac... Hope Spyder will be fixed fast.
This is (most probably) an issue with Anaconda shipping an old version of Qt, the graphical toolkit Spyder is built on.
Could you download our macOS appilcation and see if it works for you? Not sure if it will, but it could.
I'm having a similar issue to what was mentioned in that linked thread above - can install the macOS application fine, but when I go to open it, it never fully opens and stops responding.
Same issue here on an iMac 2020 after updating to Big Sur. The Spyder macOS application won't launch so it won't help.
Having the same issue here as well. Followed a guide from @impact27 on another issue to profile my Spyder.
Here's my profiler's results for multiple tasks in the editor (opening/closing file, and mostly line editing).
spyder_profile_17.11.2020.Result.zip
@vancromy Thanks a lot. It looks like it may be caiused by breakpoints or completion requests. Could you do the same in a document without any breakpoints?
@impact27 strange. That file had no breakpoints in it but I had other files open with breakpoints.
Here's another profiler result set with just one file open and no breakpoints. Still high latency on typing.
profile_results.Result.zip
@impact27, are you observing latency issues when using Spyder with Qt 5.12 or 5.15?
@vancromy, I doubt there's something we can do to fix this in our side because things were working fine in previous macOS versions. The problem is really with Big Sur, not with Spyder.
@ccordoba12 I suspect that as more users update to macOS Big Sur, the frequency of reports related to being unable to launch Spyder or encountering issues with high latency will only increase.
Knowing that the problem lies with Big Sur, and considering that Apple is unlikely to fix what they broke (at least in a timely fashion), what do you anticipate will be the way forward for macOS users of Spyder?
I reverted back to macOS Catalina for the time being, but that can't be the only solution.
@ccordoba12 FYI I noticed you mentioned earlier that it could be related to the Qt version shipped with conda. But my version is the same as @doublezz10 and much newer than the ones you quoted above (5.12/5.15).
But my version is the same as @doublezz10 and much newer than the ones you quoted above (5.12/5.15).
Nop, it's not. If you and @doublezz10 are using the same version, you're using Qt 5.9.7 (see @doublezz10's first comment). Qt 5.12 and 5.15 are more recent versions.
Knowing that the problem lies with Big Sur, and considering that Apple is unlikely to fix what they broke (at least in a timely fashion), what do you anticipate will be the way forward for macOS users of Spyder?
We can't do anything about it other than waiting for Qt to release a new version that is compatible with Big Sur, sorry.
@impact27, are you observing latency issues when using Spyder with Qt 5.12 or 5.15?
I don't realy see any latency issues, but I have a fast mac so maybe that helps?
Do other see latency at every stroke or just at specific times?
I see a Hughe latency on an iMac 2020, but now I use my MacBook Pro 2015 and find no latency. Both have been upgraded to macOS Big Sur.
I get quite heavy latency on a MacBook Pro 2019 (16 GB Ram and 6 core i7 processor). I would argue that's pretty powerful for the average user.
But my version is the same as @doublezz10 and much newer than the ones you quoted above (5.12/5.15).
Nop, it's not. If you and @doublezz10 are using the same version, you're using Qt 5.9.7 (see @doublezz10's first comment). Qt 5.12 and 5.15 are more recent versions.
My mistake, sorry.
@skimeur Could you make a list of every version of the packages you have on both machines? (go to the menu entry Help > Dependencies, press the Copy to clipboard button and paste below )
iMac:
applaunchservices >=0.1.7 : 0.2.1 (OK)
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)
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)
cython >=0.21 : 0.29.21 (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)
MacBook Pro 2015:
applaunchservices >=0.1.7 : 0.2.1 (OK)
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)
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)
cython >=0.21 : 0.29.21 (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)
@skimeur Thanks! what about the python / spyder / qt versions? ( You can get this information from Help > About Spyder...)
iMac 2020:
Python 3.8.1 64-bit | Qt 5.9.7 | PyQt5 5.9.2 | Darwin 20.1.0
MacBook Pro 2015:
Python 3.7.6 64-bit | Qt 5.9.6 | PyQt5 5.9.2 | Darwin 20.1.0
I just pip installed pyqt==5.12 and pyqtwebengine=5.12 in my base conda environment and noticed a substantial decrease in the latency! Still a bit of latency but not as pronounced as before. :)
@vancromy, really good to know! What about with pyqt/pyqtwebengine 5.15?
@ccordoba12 pyqt 5.13 and 5.12 are working well (could even argue the upgrade to 5.13 reduced the latency even more). Both 5.14 and 5.15, Spyder launches and shows in the dock but the GUI is never visible and I need to force quit Spyder in order to quit (seems like same behaviour as #14222). The console log showed this error on launch for both 5.14 and 5.15:
qt.qpa.fonts: Populating font family aliases took 696 ms. Replace uses of missing font family "'Quattrocento Sans'" with one that exists to avoid this cost.
I don't mind running with pip installed pyqt 5.13 if it means I don't have to deal with latency but I am getting dependency warnings saying that Spyder isn't compatible with 5.13 (even though it seems to run just fine for the few things I tested). Here are the warnings I'm seeing in my console:
ERROR: spyder 4.1.5 requires pyqt5<5.13; python_version >= "3", but you'll have pyqt5 5.13.0 which is incompatible.
spyder 4.1.5 requires pyqtwebengine<5.13; python_version >= "3", but you'll have pyqtwebengine 5.13.0 which is incompatible.
(I still need to upgrade my Spyder to 4.2)
Thanks a lot for your help @vancromy! If things are working fine for you (minus the small latency) in 5.12, please stay with that version.
I just want to chime in and confirm that this solution worked for me as well with the same issues of typing latency after big sur update. The most recent version of PyQT i can get to work is 5.13.0. With 5.13.1 the GUI doesn't load, and I have to force quit the application as @vancromy mentioned. Thank you!
I can confirm that pip installing PyQt==5.12.0 and PyQtWebframe==5.12 did reduce the latency dramatically - I can barely notice it anymore. I did get a dependency error that Spyder needs PyQt>=5.13, but so far, everything has been working fine for me!
It seems that the method mentioned by @vancromy also worked for me. Now the response is obviously faster than before, especially when switching among files.
I first created a conda environment from the following .yml
file with conda env create -f spyder4.yml
:
name: spyder4
channels:
- conda-forge
- defaults
dependencies:
- jupyter_nbextensions_configurator
- jupyterlab
- nb_conda_kernels
- notebook
- python=3.6
- rise
- spyder=4.2.0
- spyder-notebook
Then in the new spyder4 environment:
conda install pyqt=5.12
Note from @ccordoba12: I edited this answer because it starts to spread incorrect advice:
spyder-ide
channel if you use conda-forge. All packages present in our channel are present there.5.12
with pip if you use conda-forge because conda-forge already provides that version.It might be interesting to mentioned that I once created an App for Spyder by using the following method:
https://stackoverflow.com/questions/20723977/ways-to-invoke-python-and-spyder-on-osx
With the method described above, however, I cannot start Spyder from Dock any more. After clicking the Spyder icon in Dock, Spyder first launches but then quickly closes. Now I have to start Spyder from terminal.
see comment https://github.com/spyder-ide/spyder/issues/14222#issuecomment-729486084
I have still noticed sluggish typing in the editor even on Catalina with macOS application (4.2.0).
MacBook Pro
Version 10.15.7
MacBook Pro (16-inch, 2019)
Processor 2.4 GHz 8-Core Intel Core i9
Memory 16 GB 2667 MHz DDR4
Graphics AMD Radeon Pro 5300M 4 GB
Intel UHD Graphics 630 1536 MB
Spyder
* Spyder version: 4.2.0 None
* Python version: 3.8.6 64-bit
* Qt version: 5.12.9
* PyQt5 version: 5.12.3
* Operating System: Darwin 19.6.0
Dependencies
# Mandatory:
applaunchservices >=0.1.7 : 0.2.1 (OK)
atomicwrites >=1.2.0 : 1.4.0 (OK)
chardet >=2.0.0 : 3.0.4 (OK)
cloudpickle >=0.5.0 : 1.6.0 (OK)
diff_match_patch >=20181111 : 20200713 (OK)
intervaltree >=3.0.2 : 3.1.0 (OK)
IPython >=4.0 : 7.19.0 (OK)
jedi =0.17.2 : 0.17.2 (OK)
jsonschema >=3.2.0 : 3.2.0 (OK)
nbconvert >=4.0 : 6.0.7 (OK)
numpydoc >=0.6.0 : 1.1.0 (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.3 (OK)
pygments >=2.0 : 2.7.2 (OK)
pylint >=1.0 : 2.6.0 (OK)
pyls >=0.36.1;<1.0.0 : 0.36.1 (OK)
pyls_black >=0.4.6 : 0.4.6 (OK)
pyls_spyder >=0.1.1 : 0.1.1 (OK)
qdarkstyle >=2.8 : 2.8.1 (OK)
qtawesome >=0.5.7 : 1.0.1 (OK)
qtconsole >=4.7.7 : 4.7.7 (OK)
qtpy >=1.5.0 : 1.9.0 (OK)
setuptools >=39.0.0 : 50.3.2 (OK)
sphinx >=0.6.6 : 3.3.0 (OK)
spyder_kernels >=1.10.0;<1.11.0 : 1.10.0 (OK)
three_merge >=0.1.1 : 0.1.1 (OK)
watchdog >=0.10.3 : 0.10.3 (OK)
zmq >=17 : 19.0.2 (OK)
# Optional:
cython >=0.21 : None (NOK)
matplotlib >=2.0.0 : None (NOK)
numpy >=1.7 : None (NOK)
pandas >=1.1.1 : None (NOK)
scipy >=0.17.0 : None (NOK)
sympy >=0.7.3 : None (NOK)
Hi guys I got the same problem as all of you and I've been struggling for a couple of days without finding any solution, finally I found a couple of people with the same problem and finding ways to solve it . Before starting wanna just let you know that I have a MacBook Pro 2018 i7 16gb RAM. My spider is version 4.1.4, Qt console 4.7.5 and python 3.8. I already try to do the commands you talked here: "pip install pyqtwebengine==5.12" and "pip install pyqt==5.12" and the first one gets an error:
ERROR: spyder 4.1.4 has requirement pyqt5<5.13; python_version >= "3", but you'll have pyqt5 5.15.1 which is incompatible.
and the second one says that it could not find a version.
Do you suggest something for my situation ?
This is starting to accumulate incorrect answers (some of which are very bad advice). Therefore, I'm going to block the issue so that people that find it through Google can read the right way to fix this, which is the following:
If you use conda, please run these commands in Terminal.app (pip is for experts, so you'll what to do by reading this):
conda create -n spyder-dev python=3
conda activate spyder-dev
pip install -U spyder
Then, to start Spyder and avoid latency issues, you need to run
conda activate spyder-dev
export QT_MAC_WANTS_LAYER=1
spyder
Note: Please ignore the warning about rtree
for now.
If you prefer to use only conda packages, the solution consists first in installing Spyder with:
conda create -n spyder-dev python=3
conda activate spyder-dev
conda install -c conda-forge spyder
Then, to start Spyder and avoid latency issues, you need to run
conda activate spyder-dev
export QT_MAC_WANTS_LAYER=1
spyder
Most helpful comment
Thanks a lot for your help @vancromy! If things are working fine for you (minus the small latency) in 5.12, please stay with that version.