Spyder: Very slow line execution using IPython in macOS

Created on 5 Jan 2016  Â·  115Comments  Â·  Source: spyder-ide/spyder

After running a few initial commands in a new IPython console (regardless of what they may be), line execution automatically defaults to multline mode and slows down considerably.
For example:

Opening new IPython console:
Python 3.5.1 (default, Dec 20 2015, 15:56:10) 
Type "copyright", "credits" or "license" for more information.

IPython 4.0.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
%guiref   -> A brief reference about the graphical user interface.

In[1]: l1 = ['apple','orange','banana']
In[2]: l2 = ['carrot','onion','zucchini']
In[3]: l3 = ['yellow','green','red']
In[4]: l4 = ['Honda','Toyota','Ford']
  ...:

This last line will take several seconds to execute, and all subsequently entered statements will behave similarly, making the console virtually unusable.

OSX Yosemite (10.10.5)
Spyder: 2.3.8 (installed via pip)
Python: 3.5.1 (installed using homebrew)
Qt: 4.8.7_2 (installed using homebrew)


IPython >=1.0      :  4.0.1 (OK)
jedi >=0.8.1;<0.9.0:  0.8.1 (OK)
matplotlib >=1.0   :  1.5.0 (OK)
pandas >=0.13.1    :  0.17.1 (OK)
pep8 >=0.6         :  1.6.2 (OK)
psutil >=0.3       :  3.3.0 (OK)
pyflakes >=0.6.0   :  1.0.0 (OK)
pygments >=1.6     :  2.0.2 (OK)
pylint >=0.25      :  1.5.2 (OK)
qtconsole >=4.0    :  4.1.1 (OK)
rope >=0.9.2       :  0.10.3 (OK)
sphinx >=0.6.6     :  1.3.3 (OK)
sympy >=0.7.3      :  0.7.6.1 (OK)
zmq >=2.1.11       :  15.1.0 (OK)

This issue does not occur when opening a Qt console outside of the Spyder environment. Any help or suggestions would be much appreciated.

MacOS IPython Console Bug

Most helpful comment

@NelsonUpenn, according to other users, this problem could be solved by running the following command in Terminal.app

conda install ipython=6 ipykernel=4

All 115 comments

This appears to affect me as well, although it's not exactly 100% reproducible. I'm not sure if the console is entering multiline mode, but sometimes, after some small number of commands, the console takes a second or so to finish any command. This makes the spyder console unusable.

Ubuntu 16.04 (Xenial)
python 2.7.11+
ipython 4.1.0rc1
Spyder 2.3.8
Qt 4.8.7

IPython >=1.0      :  4.1.0rc1 (OK)
jedi >=0.8.1;<0.9.0:  None (NOK)
matplotlib >=1.0   :  1.4.3 (OK)
pandas >=0.13.1    :  0.16.2 (OK)
pep8 >=0.6         :  1.6.2 (OK)
psutil >=0.3       :  3.2.2 (OK)
pyflakes >=0.5.0   :  0.9.2 (OK)
pygments >=1.6     :  2.0.2 (OK)
pylint >=0.25      :  1.4.4 (OK)
qtconsole >=4.0    :  4.1.1 (OK)
rope >=0.9.2       :  0.10.2 (OK)
sphinx >=0.6.6     :  1.3.1 (OK)
sympy >=0.7.3      :  0.7.6 (OK)
zmq >=2.1.11       :  14.7.0 (OK)

This just started happening for me as well after an update. Currently using:
Python 3.7.1
conda version 4.5.11
Spyder 3.3.1

same here, although I am afraid I can't point to exactly what changed on my system before/after the performance loss

Python 3.6.6
conda version 4.5.11
Spyder 3.3.1

Mac OS X 10.14

Same. I'm new to anaconda/spyder and I've had this issue since I started.
Mac OSX 10.13.6
conda version : 4.5.11
conda-build version : 3.15.1
python version : 3.7.0.final.0
qt 5.9.6
spyder 3.3.1
ipython 7.1.1

A successful work around for me has been to downgrade to spyder 3.1.4, where the python console is still available for use. This issue does not occur with the python console but does occur with the Ipython console in this version as well. Additionally this has persisted through an update from OSX 10.13 to OSX 10.14.

Additionally see: https://stackoverflow.com/questions/53381373/ipython-console-in-spyder-extremely-slow-in-anaconda/53415444#53415444

Dependencies are:

jedi >=0.9.0     :  0.13.1 (OK)
matplotlib >=1.0 :  3.0.1 (OK)
nbconvert >=4.0  :  5.3.1 (OK)
numpy >=1.7      :  1.15.4 (OK)
pandas >=0.13.1  :  0.23.4 (OK)
pep8 >=0.6       :  1.7.1 (OK)
psutil >=0.3     :  5.4.8 (OK)
pyflakes >=0.6.0 :  2.0.0 (OK)
pygments >=2.0   :  2.2.0 (OK)
pylint >=0.25    :  2.1.1 (OK)
qtconsole >=4.2.0:  4.4.2 (OK)
rope >=0.9.4     :  0.11.0 (OK)
sphinx >=0.6.6   :  1.8.2 (OK)
sympy >=0.7.3    :  1.3 (OK)

thanks for this temporary solution @jjruby09 !

Yep, python console in 3.1 works for me too. Also the issue is fully reproducible for me: the ipython console is painfully slow with _any_ code in _any_ anaconda environment

Posting Me too is not helpful @andbeonetraveler. Are you also using macOS?

@ccordoba12 I think it was a follow up to the original post above stating the configuration.

Same. I'm new to anaconda/spyder and I've had this issue since I started.
Mac OSX 10.13.6
conda version : 4.5.11
conda-build version : 3.15.1
python version : 3.7.0.final.0
qt 5.9.6
spyder 3.3.1
ipython 7.1.1

@jjruby09 yes. also I noticed a previous poster said it's not fully reproducible, but it is for me. Should have said that in my op.

Same issue for me as well.
macOS 10.12.6
ipykernel, version = 5.1.0, build = py36h39e3cac_0
ipython, version = 7.0.1, build = py36h39e3cac_0
jupyter_client, version = 5.2.3, build = py36_0

@cgit2017, could you downgrade to ipykernel 4.10 and try again? Thanks!

@ccordoba12 downgrading to ipykernel 4.10 seems to have solved the issue for me.

Can others in this thread confirm @cgit2017 findings? Thanks!

@ccordoba12 downgrading to ipykernel 4.10 seems to have fixed it for me as well. Thanks for your help!

The following downgrades have dramatically improved (maybe even solved, time will tell) the issue for me on MacOS 10.14.1 (Mojave):

  • ipykernel 5.1.0 -> 4.8.2
  • ipython 7.1.1 -> 6.5.0

This issue has been pretty reproducible for me, so I'm willing to help test specific versions if that is helpful towards finding the final solution.

@ccordoba12 Downgrading to ipykernel 4.10 seems to have made Spyder even slower in my case, but perhaps I should blame pyFMI, not sure (Spyder just froze entirely after loading an FMU, simulating it, and trying to read results into Python).

EDIT: Too bad, it's not just pyFMI. Spyder freezes on other occasions too.
EDIT 2: @nealtanner Downgrading ipython as well doesn't help either

MacOS 10.14.1 (Mojave)
Miniconda3, conda 4.5.11
ipython 7.2.0
ipykernel 4.10.0 (just downgraded)
Spyder 3.3.2
qt 5.9.6
Python 3.6.7 (in this particular environment)

P.S. I'm only having this issue on MacOS, I've been using Spyder on Ubuntu, Raspbian, Windows, never experienced any trouble so far

@sitadrost, could you also downgrade IPython to 6.5.0?

Thanks, but I already tried that (see post above), didn't help, unfortunately.

@ccordoba12 downgrading to ipykernel 4.10 in spyder 3.3.1 is working for me!
@sitadrost did you try downgrading to spyder 3.1?

Just did now :o) Seems to work much better, even when using the iPython console. Still a bit slow at times, but no freezes up to now. Thanks for the tip!

At startup I get an error message though. It doesn't seem to prevent Spyder from running, but for sake of completeness I'm pasting it here:

<spyder.otherplugins._ModuleMock object at 0x1228cd5c0>: '_ModuleMock' object has no attribute 'PLUGIN_CLASS' Traceback (most recent call last): File "/Applications/miniconda3/envs/tryout/lib/python3.6/site-packages/spyder/app/mainwindow.py", line 1031, in setup plugin = mod.PLUGIN_CLASS(self) AttributeError: '_ModuleMock' object has no attribute 'PLUGIN_CLASS'

@sitadrost, that error was fixed in Spyder 3.3

@ccordoba12 downgrading to ipykernel 4.10 in spyder 3.3.1 is working for me!

same here @ccordoba12

Ok, so now we have a clear idea of how to workaround this problem (which is nice until we find a solution for it).

Now I need from you a simple way to reproduce it, so we can test it and fix it in our side. Could anyone post a step by step description on how generate this issue? Thanks!

With the configuration I listed:
Open a script. Run script. Type command (anything) into the console. May
take a few commands before it starts to slow down.

@andbeonetraveler, ok, thanks! I'll take a look at it during the weekend in a VM.

@ccordoba12, here is my procedure for replicating the issue. I'm sorry that I didn't have time to further boil it down to just the essentials, but maybe this will still help.

  • macos 10.14.1
  • create and activate new virtualenv w/ python 3.7 (from anaconda navigator)
  • conda update --all
  • conda install spyder (results in spyder 3.3.2, ipykernel 5.1.0, ipython 7.2.0)
  • conda install pandas (results in 0.23.4)
  • launch spyder from anaconda navigator
  • create a script with the following contents
import pandas as pd
import numpy as np
print('This is a test')
num_rows = 1000
df = pd.DataFrame(np.random.randn(num_rows, 4), columns=list('ABCD'))
print(df)
for idx in range(100):
    print(df.A.T)
  • run script in dedicated ipython console with big green arrow
  • in console, hit enter key repeatedly (5-10 times, relatively quickly)
  • repeat last two steps until console exhibits issues (typically <6 times in my testing)

Observed behaviors include:

  • next script execution hangs entirely
  • console window stops scrolling correctly
  • console commands are interpretted as unfinished (see below)
In [9]: 
    ...: 

In [9]: 

In [10]: 
    ...: 
    ...: 
    ...: 
    ...: 
    ...: 
    ...: 
    ...: 
    ...: 

I'll leave this (busted) virtualenv around in case you would like help with further testing.

Ok, thanks @nealtanner! That's much more concrete!

In my case (for specs see my previous posts) it varies a little, but it basically comes down to starting Spyder, running a few commands in IPython from the editor using F9, and then IPython becomes extremely slow, or freezes completely, although I can still close Spyder in a more or less normal way, no need to force quit. The number of commands I can run before IPython slows or freezes varies, even if I'm running the same commands.

I generally use Python in a rather Matlab-ish way, meaning that I tend to start with importing numpy and matplotlib.pyplot. I haven't tried reproducing this issue without importing these packages yet.

Perhaps worthwhile to add some more details about my computer: I'm running MacOS Mojave (10.14.1) on a mid-2013 MacBook Air, 1.3 GHz Intel Core i5 processor, 4 GB 1600 MHz DDR3 memory, Intel HD Graphics 5000 1536 MB

I import pandas at the beginning of each script. Usually, but not always,
numpy and matplotlib as well. If memory serves, I've had this issue with
every script

On Fri, Dec 7, 2018, 1:33 AM sitadrost <[email protected] wrote:

In my case (for specs see my previous posts) it varies a little, but it
basically comes down to starting Spyder, running a few commands in IPython
from the editor using F9, and then IPython becomes extremely slow, or
freezes completely, although I can still close Spyder in a more or less
normal way, no need to force quit. The number of commands I can run before
IPython slows or freezes varies, even if I'm running the same commands.

I generally use Python in a rather Matlab-ish way, meaning that I tend to
start with importing numpy and matplotlib.pyplot. I haven't tried
reproducing this issue without importing these packages yet.

Perhaps worthwhile to add some more details about my computer: I'm running
MacOS Mojave (10.14.1) on a mid-2013 MacBook Air, 1.3 GHz Intel Core i5
processor, 4 GB 1600 MHz DDR3 memory, Intel HD Graphics 5000 1536 MB

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/spyder-ide/spyder/issues/2902#issuecomment-445137334,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ArHaQJPo_rp80BWPrWkgvIM5EAZsJrcfks5u2gvRgaJpZM4G-tr9
.

@sitadrost If you are using F9 on large chunks of code you should check that your history isn't getting too full. I've had problems with that in the past.

@bcolsen No, I meant line by line execution

I can actually reproduce the issue. With either Spyder 4 or 3.x with any combination of the ipython version. Anaconda or a pip custom install. MacOS 10.14.
Opening spyder ans running a few commands of simple calculus is enough. No extra modules involved.
In another note, using ipython from the terminal outside spyder does not reproduce the behavior!

@max3-2 Can you reproduce this in a jupyter-qtconsole?

Just wanted to confirm that I had the same issue but was able to fix it when downgrading ipykernel from 5.1.0 to 4.10.0.

MacOS: 10.13.6 (High Sierra)
Python: 3.6.0
Spyder: 3.3.2
iPython: 7.0.1

@max3-2 Can you reproduce this in a jupyter-qtconsole?

Had no time yet, I'll try it later on and keep you updated!

No, cannot reproduce this issue in qtconsole.

Anyone has a fix yet for macOS 10.14?

No, sorry.

I am having the same problem. It started a week ago when I updated anaconda on macOS. Since this problem appeared after I updated anaconda, does anyone know what knew component of anaconda is causing this issue and how to downgrade it? Sorry if this is a simple question, I am new to python.

You can try to downgrade ipykernel and ipython, see above. However, on 10.14.x (_mojave_), this disnt solve the issue for me.

@silveiralucas You can downgrade with conda install ipykernel=4, btw. How did you update Anaconda? From which to which version? If that doesn't work, can you try conda install anaconda=5.3.0 then conda update spyder?

I solved following the instructions bellow:
"To do so, add a line containing ipykernel 4.* to the file ~/anaconda3/conda-meta/pinned. Create the file if it does not exist yet. Then conda update ipykernel" source( https://stackoverflow.com/questions/53381373/ipython-console-in-spyder-extremely-slow-in-anaconda?rq=1).
So far it seems to be working fine for me.

Glad it works for you.

For clarity, this is equivalent to what we suggested, as it pins the version of ipykernel to 4.x just as my install command does. The advantage to that method is its permanent until you change it, such that you don't update it accidentally, but on the other hand when the problem is solved you'll need to remember to manually remove it or else you'll be stuck on ipykernel 4.x forever which will eventually become a problem.

@max3-2, I am using macOS Mojave and using the latest version of ipykernel 4.* with everything else unchanged seems to be working fine.

@CAM-Gerlach, thanks for the tip. By the way, answering your question, I formatted and updated the entire machine at once and installed a fresh version of Anaconda from their website last week. That's when the problem appeared, but downgrading just the ipykernel to 4.* seems to be working fine. Interestingly, on my other machine running Ubuntu everything works just fine and even faster, even being a less powerful machine. Maybe the newer version of the ipykernel is faster, but on macbook I'll be stuck with the 4.* version for a while.

Interestingly, on my other machine running Ubuntu everything works just fine and even faster, even being a less powerful machine.

At least conda operations etc. I find to be much faster and more efficient on Linux, even when running in a VM vs. a native Windows machine, although I haven't noticed something specific inside of Spyder myself. There are many differences in libraries, compilers and OS facilities that help result in this difference.

Maybe the newer version of the ipykernel is faster, but on macbook I'll be stuck with the 4.* version for a while.

@silveiralucas or others, can you duplicate the problem inside a jupyter qtconsole instance running the latest version of ipykernel 5.x? Or does it only occur within Spyder itself in that scenario? If the former, we can consider reporting this upstream to the ipykernel repo so that they can hopefully figure out and fix it on your or, or else help isolate the root cause. If the latter, the cause could potentially lie with something to do with Spyder itself. Thanks!

Ok I did another run of testing just using pip. This time started from scratch and installed everything with up-to-date versions. Issue persists. Then, I removed spyder, downgraded the kernel and reinstalled spyder from master:

pip uninstall spyder
pip uninstall ipykernel
pip install ipykernel==4.10.0
pip install git+https://github.com/spyder-ide/spyder

Dependencies are now up to date (including pyqt5) with the exception of ipykernel

ipykernel 4.10.0
spyder 4.0.0.dev0
pyqt5 5.11.3

From a medium testing, the issue is resolved or at least minimized. I have tried this procedure before (see above) to no avail. The only change is the new pyqt5 which was allowed just a few days ago. All together, the issue seems to be with the new ipykernel, since 4.10 seems to resolve it for many people.

@CAM-Gerlach: I wasnt able to reproduce outside spyder even when the issue persisted with the newest ipykernel. Even though I would like to help, i don't really see a way to debug it since there are no errors at all, just a slowdown until a freeze. It almost feels like an memory issue even though machine memory profiling does not show anything. Any ideas?

Thanks @max3-2 for the new info. Could you remove Spyder and install it again, but it's 3.x branch, with

pip install git+https://github.com/spyder-ide/[email protected]

to see if the error is fixed too? Thanks!

Also, did you try with ipykernel 5 and PyQt 5.11? Is the error still present there?

1) No changes with ipykernel 5 and pyqt 5.11 - still crashing

2) spyder3.x does show the same behaviour. Working with ipykernel 4.10, crashing with 5.

3) I might have some interesting additional information: At least fairly reproducable, it seems that IPython inside spyder is stable with version 5 UNTIL import matplotlib.pyplot which then crashes ipykernel 5.
Using matplotlib==3.0.2 and the Qt backend. Maybe something here is broken with the backend?

@minrk Any idea what's going on here? Should this be reported over on your side or does it need to be fixed on ours? Thanks!

I downgraded to ipykernel 4.10 and it worked fine for some days. However, today, the slow behaviour started again. I'm using

  • macOS Mojave 10.14.2 (18C54)
  • Python 3.7.0
  • Spyder 3.3.2
  • IPython 7.2.0
  • ipykernel 4.10.0
  • anaconda-client 1.7.2
  • anaconda-navigator 1.9.6
  • anaconda-project 0.8.2

On Ubuntu 18.10, everything works fine.

I might have some interesting additional information: At least fairly reproducable, it seems that IPython inside spyder is stable with version 5 UNTIL import matplotlib.pyplot which then crashes ipykernel 5.

@max3-2, what do you mean by "crashes ipykernel 5.". How is the crash generated?

@ccordoba12 well that’s the problem. It‘s not a crash with an error or anything. The simplest commands like ‘a=5‘ and then just ‘a‘ takes up to minutes. Its getting worse with every command until the console is not responsive anymore.
This also propagates to the variable explorer where new variables or changes propagate another few seconds after the ipython consoles finished parsing.

Restarting the console then helps until reproduction of the error using the above procedure. I have the feeling the slowing down occurs faster with every restart but that’s nothing I can prove

I just recently upgraded to Mojave and immediately experienced the same issues described in this issue. However, I was able to resolve it by _only_ downgrading ipykernel from 5.1.0 to 4.10.0.

My setup is a bit different, but perhaps not uncommon. I use a separate "spyder" Anaconda environment from which to run Spyder but use my default environment to run the ipython console (~/anaconda3/bin/python3.6 selected for the Python interpreter in Spyder preferences)

Downgrading ipykernel to 4.10.0 in my Spyder environment had no effect, so I restored it back to 5.1.0.
It seems that the environment from which the Python interpreter is all that matters, not the environment from which Spyder is executed. Attached are dumps of my Anaconda environments.

default.txt
spyder.txt

Spyder environment setup:
spyder 3.3.2
ipykernel 5.1.0
ipython 7.1.1

Default environment setup:
ipykernel 4.10.0
ipython 7.2.0

@mrclary . It seems you solved the problem :). Could you explain me how to implement your solution in more details? Best regards, Lucas Silveira.

@silveiralucas He essentially did what you did, downgrading to ipykernel 4.10, However, you said that stopped working after a few days. Can you confirm your ipykernel version is still at 4.10 by running conda list ipykernel in the Terminal? Thanks.

@CAM-Gerlach, running "conda list ipykernel" and "conda list" on the terminal I get respectively:

conda list ipykernel.txt
conda list.txt

The slow behaviour returned after about a week and seems to get worse the more I use Spyder.

However, he mrclary mentioned that "Downgrading ipykernel to 4.10.0 in my Spyder environment had no effect" and that he "use[s] a separate "spyder" Anaconda environment from which to run Spyder but use[s] [his] default environment to run the ipython console (~/anaconda3/bin/python3.6 selected for the Python interpreter in Spyder preferences)". I wonder how to do that (sorry if the question is a bit basic).

Best regards,

Lucas Silveira

@silveiralucas,
I only implemented this 2 days ago, so maybe after a week the problem will resurface as it did for you.
This is how to replicate my setup. >> is my terminal prompt, don't type it in.

  1. Create a spyder environment. From the terminal
    >> conda create -n <env name> spyder
    This creates an environment named <env name> (I used the name spyder) and installs spyder into this environment. Note that all required packages will be installed at their latest compatible versions (spyder, python, etc.). This environment is only for running the Spyder gui application, not the console within Spyder. This environment does _not_ require downgrading ipykernel.
  2. In my default (main) environment I only downgraded ipykernel.
    >> conda install ipykernel=4
  3. Start Spyder from the new environment
    >> source activate <env name>
    (<env name>)>> spyder
  4. In Spyder preferences select the python distribution you want to use for your console. Preferences-> Python Interpreter -> Use the Following Python interpreter. Select the python executable in your default environment, ~/anaconda3/bin/python3.6 in my case.
  5. Restart Spyder (from the spyder environment). You should be good to go.

I'm not sure splitting environments will make any difference, but its certainly worth trying. Thanks for the great summary, @mrclary . Also, @silveiralucas a comprehensive explanation of this setup can be found in our Guide to Working with Package and Environments with Spyder.

We actually recommend it over the default "all-in-one" environment for users who install a lot of their own packages, since it helps prevent your Spyder and "working" environment(s) from becoming "contaminated" with one another and easily scales to multiple working environments. This all will be much easier to manage in Spyder 4, since it will include a built-in GUI package and environment management system.

These two solved the problem for me:
ipython-6.4.0
ipykernel-4.10.0

Can someone explain how to downgrade ipykernel in the base environment via Anaconda Navigator (or to create a new environment for Spyder), and/or how the command line solutions described here interact with the Anaconda Navigator? I'm a relative newbie moving from Matlab, and am rather hopelessly confused about environments, virtual environments, package managers, and how the various pieces of Spyder interact. I'm pretty good with the Python language and prefer it to Matlab, it's all this other stuff that is causing confusion. I sincerely appreciate any help!

  • Andy

@jandyman You can downgrade ipykernel with the command mentioned earlier in the thread, conda install ipykernel=4, from the Anaconda prompt on Windows or the Terminal/command line on other OSes. Anaconda Navigator is essentially a graphical interface for the conda package and environment manager, so any changes you make on the command line should be reflected there and vice versa. You can probably downgrade a package with it as well, though I'm not sure since I don't really use it much myself. We're currently working on adding built-in support for graphical package and environment management in Spyder 4, due out in a few months.

I'm a relative newbie moving from Matlab, and am rather hopelessly confused about environments, virtual environments, package managers, and how the various pieces of Spyder interact.

Check out our guide to managing packages and environments with Spyder for more specific advice on that. Its important to remember that Spyder is an IDE (like Rstudio, Eclipse or the Matlab graphical IDE) with a number of useful tools for science, engineering and data analysis with Python, while Python is the core language (equivalent to the Matlab programming language) on top of which an ecosystem of scientific packages (Numpy, Scipy, Pandas, Matplotlib, etc) have grown. I won't go into more detail here to avoid getting the thread too off topic, but feel free to ask on our Gitter chat and I'd be happy to try to explain more of how the various pieces work together and answer your questions.

So if I have three different environments in Anaconda Navigator, and I issue commands from the terminal, which environment will be modified? Also, how would I go about "cloning" an environment, modifying that one, and then telling Spyder to use it. Should I just forget about Anaconda navigator and learn all the command line stuff?

So if I have three different environments in Anaconda Navigator, and I issue commands from the terminal, which environment will be modified?

Whichever environment is currently active, which is displayed next to the prompt in most terminals. The default environment, base, will be active when you first launch a given terminal. To switch to another, you type activate <env-name-here> on Windows and source activate <env-name-here> on other platforms. So, you'd want to activate your working environment(s) that you use with Spyder's IPython Console and update it in each of those to fix this issue.

how would I go about "cloning" an environment, modifying that one

I found this SE question, but that's honestly out of scope here. You're better off asking general Python/Anaconda questions like this on our Gitter or on more Anaconda-related platforms.

and then telling Spyder to use it.

See the above guide I linked in my last comment, which explains how to do that.

Should I just forget about Anaconda navigator and learn all the command line stuff?

I personally prefer the latter, but its up to you. The command should hopefully fix this issue, but you should be able to downgrade a package in Navigator as well.

These two solved the problem for me:
ipython-6.4.0
ipykernel-4.10.0

I confirm that downgrading solved for me as well

Hi,
I am experiencing the very same problem, but downgrading to ipython-6.4.0 and ipykernel-4.10.0 did not help at all. Neither the dedicated spyder environment like @mrclary explained. I tried every possible option, downgrading the base environment or/and the spyder environment.

As soon as I do a couple of demanding computations (I deal with several large numpy arrays) the console hangs severely. Is there any other fix or suggestion how I can solve it?

Help is highly appreciated!

So, to confirm, if you run the same computations from QtConsole (jupyter qtconsole from the Terminal), do you see the same slowness?

No. Indeed when using jupyter qtconsole (from base) I do not observe the lack when typing e.g. 1+1, after doing the very same commands leading to lack in spyder. However, qtconsole seem overall slower to do the computation. Does that mean my ipykernel-4.10.0 is not correctly set? I know ipython-6.4.0 is set when launching spyder and ipython.

@keyfm So the lag in Spyder occurs when typing, not when pressing enter to execute the command, whereas the opposite is true in plain QtConsole? You are on macOS, correct? The bug discussed here appears to be macOS-specific. What version of your OS, Python, PyQt, Qt, Spyder-Kernels and QtConsole, just to confirm? Thanks.

The lag occurs when executing, not when typing. Sry for being unclear.

I am running mac OS 10.12.6
In my spyder env I have the following settings (base settings if different)
Python3.7.2
pyqt5.9.2
qt5.9.7
spyder-kernels0.4.2 (spyder-kernels0.3.0)
qtconsole4.4.3

Just to be clear, I ran qtconsole in the base env while running spyder in the just earlier today created spyder environment. I cannot run my code in the qtconsole within the spyder env as multiple python packages are not installed (spyder is set to use the base python3.7.2 as @mrclary suggested). However, I just tested spyder called from within the base environment as well and the lag is present, while absent from qtconsole.

Please downgrade to Qt 5.9.6 and try again.

Unfortunately downgrading to qt5.9.6 does not solve the problem either. Please find attached the complete result of conda list (in case that helps) of the base environment which I currently use to run spyder.

Of note, I use spyder now for a couple of weeks but just started with a new, rather big dataset. The memory indicator in the lower right hovers around 60-70%. The problem never occurred previously.

The exact lag I experience is, that I type e.g. 1+1, hit enter, and all I see is ... (as often as I hit enter). After waiting some 20-30 seconds I hit enter again and get the result finally. I also tried to run my complete command in spyder over night and it hang, while qtConsole finished it last night in ~15min.

Again, your support is highly appreciated.
base_env.txt

Sorry, I can't help you with most of your problems, but the thing you describe regarding entering a command into the iPython console and only getting ... (as if you were entering a multi-line command) seems to be some kind of bug. I don't know how to properly resolve this (I ran into a thread on this the other day, but didn't get to reading all of it yet), but hitting shift-enter instead of enter at least should rid you of those multi-line dots.

Hitting shift-enter only leads to the console becoming a couple of seconds unresponsive (with little square topright being red > active ) before printing the result to the screen.

Given that everybody seems to resolve the issue by downgrading ipykernel and ipython I wonder if it might be normal behaviour in spyder which slows down when you have a couple of numpy arrays with 150,000 rows and 2,000 columns?!?

Oh dear, sorry about that, I'm afraid I can't help you at all in that case.

I hope someone can help. Also when running ~/anaconda3/bin/ipython3 in the terminal everything works fine (just like jupyter qtconsole). It happens exclusively in spyder.

The exact lag I experience is, that I type e.g. 1+1, hit enter, and all I see is ... (as often as I hit enter).

@keyfm This is not a lag at all (well, it is likely caused by a lag, but what's being displayed isn't. Rather, it is QtConsole thinking it needs to go to the next line, allowing you to enter more text (which it isn't supposed to on the first line unless you press Ctrl-Enter or leave an open paren, bracket, quote etc, just on successive lines). We've been trying to fix bug this for some time, but it still pops up most often with large arrays in memory like the one you are reporting. Try unchecking the option IPython Console > Display > Display balloon tips and see if that helps, and check out spyder-ide/spyder#6355 for more on that specific problem (which seems it may have some connection to this one, since users there also report a several second delay even when hitting Shift-Enter to execute the line instead of going to the next.

I also tried to run my complete command in spyder over night and it hang

Did you actually run the command at all, or did it merely go to the next line and wait for your input? Further, did Spyder actually "hang" (i.e. the whole UI become unresponsive)?

I don't know how to properly resolve this

@sitadrost Try disabling balloon tips (Preferences > IPython console > Display > Display balloon tips) and make sure ipykernel is downgraded to 4.x (as far as I've seen in testing any of these issues, IPython version hasn't made a difference), as it states on that thread.

I wonder if it might be normal behaviour in spyder which slows down when you have a couple of numpy arrays with 150,000 rows and 2,000 columns?!?

It shouldn't make a difference to Spyder as long as your machine has enough memory, unless it is trying to introspect the array, which is where the potential problem with balloon tips comes in or if you try to view it in the Variable Explorer.

Also when running ~/anaconda3/bin/ipython3 in the terminal

FYI, instead of doing this you should type conda activate YOUR-ENV-NAME and then merely run it with python to ensure your PATH and environment is set up correctly.

@keyfm, I think your problem is related to the size of your arrays and not to what's been reported here. So please a new issue about it to continue the discussion there and stop posting more comments here.

I think your problem is related to the size of your arrays
So please a new issue about it

If it is, then the appropriate issue is likely #6355 as I describe above, because both the symptoms (enter creating a new line, several second delay in execution) and the apparent trigger (large arrays/dataframes, macOS) appear similar or identical.

No, it's not. It's a different issue. If fact, that issue was fixed in qtconsole 4.4.3, so I'm going to close it.

Thx for everybody's comment. Just for the record in case someone else ends up here with the problem I describe. None of the suggestions here fixes my lag when working with large datasets even though my memory limit is not reached. Working with small datasets in spyder is fine, and I use for larger datasets just the terminal for now. I will post a new issue as soon as I have a better handle on what exactly is the tipping point in spyder (which I would love to use for all analysis). Again, thx everybody.

I have a fresh new install of anaconda distribution. I have no large arrays. See attachment for my full conda list (IPython 7.4.0 in Spyder 3.3.3 in Mojave 10.14.4). I have the same symptoms others have noted:

  • Commands entered in IPython console wrongly elicit the ...: prompt.
  • Forcing execution with shift-return results in enormous delays. During this delay the "interrupt" square turns red. Somebody is doing a lot of something apparently.
  • Executing code in the code window works fine, no problem.
  • Turning off balloon tips doesn't help.
  • Restarting the mac doesn't help. Relaunching Spyder doesn't help.
    If downgrading some component is still the best answer, please let me know that, or whatever is better. Greatly appreciated. PN
    2019-04-08setup.txt

I have similar issues.
I've tried all the above suggested downgrading with essentially no change.
At this point I'm going to just try another IDE until this gets fixed.

@ccordoba12 This appears to be serious enough to cause users to make the IDE completely unusable for users. Any way one of our new Mac developers can take a look?

@dansamber @NelsonUpenn Really sorry you're experiencing these issues. Can you try running the same commands you're noticing this on with Spyder in a jupyter qtconsole instance, an ipython interpreter and the standard python interpreter, and report if you're seeing the same delays? This might help us isolate the source of the problem. Thanks!

@NelsonUpenn, according to other users, this problem could be solved by running the following command in Terminal.app

conda install ipython=6 ipykernel=4

Any way one of our new Mac developers can take a look?

@goanpeca, are you able to reproduce this issue?

Downgrading to ipykernel 4.10 solved for me (with minor issues once in a while). A permanent solution allowing to run the most recent kernels would be better.

@goanpeca, are you able to reproduce this issue?

I have seen things like this:

The exact lag I experience is, that I type e.g. 1+1, hit enter, and all I see is ... (as often as I hit enter). After waiting some 20-30 seconds I hit enter again and get the result finally. I also tried to run my complete command in spyder over night and it hang, while qtConsole finished it last night in ~15min.

... intermittently

But the hangs not really.

Is there some minimal reproducible example that @NelsonUpenn (for any sort of commands or small arrays) or that @keyfm can provide for big arrays?

Thanks

@goanpeca, there are some examples on this issue already. Please look for them.

@dansamber @NelsonUpenn Really sorry you're experiencing these issues. Can you try running the same commands you're noticing this on with Spyder in a jupyter qtconsole instance, an ipython interpreter and the standard python interpreter, and report if you're seeing the same delays? This might help us isolate the source of the problem. Thanks!

A friend has given me the useful advice: Switch Preferences>IPython Console>Graphics>Backend from Automatic to Tkinter. So far this has eliminated the problem for me.

By the way, to answer your question I did download:
Python 3.5.2 |Enthought, Inc. (x86_64)| (default, Mar 2 2017, 08:29:05)
IPython 5.3.0 -- An enhanced Interactive Python.
There was no issue with this IPython in this IDE.

By the way, to answer your question I did download:

FYI, those are extremely old versions of Python and IPython, which we don't recommend using and were much older than @ccordoba12 recommended.

By the way, to answer your question I did download:

FYI, those are extremely old versions of Python and IPython, which we don't recommend using and were much older than @ccordoba12 recommended.

Yes. But they the old Enthought distribution works out of the box without any ad hoc downgrading. However, as I mentioned switching to Tkinter also resolves the issue for me. That may give a clue to the source of the problem and in any case it lets me use the Anaconda distribution out of the box.

Thanks for the information @NelsonUpenn that is definitely helpful. Cheers

I realize most of you discussing this elusive "..." prompt are running python 3.x with newer releases of ipykernel and ipython. I'm still stuck with 2.7.x for compatibility reasons and I've been experiencing the persistent "..." for quite some time on my mac. If they can be of any benefit to your debug efforts, few observations/comments:

  • I do not see it being associated with large data sets or arrays. I have had it occur when using python as a simple desktop calculator.
  • I frequently encounter "soft" instances of "..." which will go away after a few presses of Enter. For example:
    In [110]: print "this %e" % (1)
    ...:
    ...:
    this 1.000000e+00

  • The hard failures where I am forced to restart the console occur after a long idle period where the screensaver kicks in or the mac sleeps. It doesn't happen every idle time, but when it does occur it has always been after unlocking/waking the mac.

  • I do all of my work from Jupyter QtConsole, so it does happen in that environment.

OS: MacOS 10.14.4
python: 2.7.16
ipykernel: 4.10.0
ipython: 5.8.0
qtconsole: 4.4.3

I have temporarily downgraded to ipykernel 4.8.2, and I still get soft instances of "..." that it recovers from. Maybe too early to tell if the persistent condition requiring restarting the console is fixed.

I'm more than happy to provide additional details or test things if it would help.

Mike

Thanks for your detailed description, @mblatch . We have made looking into this issue a higher priority and are dedicating our limited resources accordingly, so we really appreciate your help (and your patience) as we work to try to track down and resolve this.

Just FYI, in case anyone is not already aware, you can simply press Shift-Enter to always execute on the current input rather than going to the next line even if you are on a continuation (...), Ctrl-Enter does the opposite.

I don't know much about all this but for me, changing the graphics backend back to 'Inline' fixed the issue.

I have a fresh new install of anaconda distribution. I have no large arrays. See attachment for my full conda list (IPython 7.4.0 in Spyder 3.3.3 in Mojave 10.14.4). I have the same symptoms others have noted:

  • Commands entered in IPython console wrongly elicit the ...: prompt.
  • Forcing execution with shift-return results in enormous delays. During this delay the "interrupt" square turns red. Somebody is doing a lot of something apparently.
  • Executing code in the code window works fine, no problem.
  • Turning off balloon tips doesn't help.
  • Restarting the mac doesn't help. Relaunching Spyder doesn't help.
    If downgrading some component is still the best answer, please let me know that, or whatever is better. Greatly appreciated. PN
    2019-04-08setup.txt

By the way, to answer your question I did download:

FYI, those are extremely old versions of Python and IPython, which we don't recommend using and were much older than @ccordoba12 recommended.

Yes. But they the old Enthought distribution works out of the box without any ad hoc downgrading. However, as I mentioned switching to Tkinter also resolves the issue for me. That may give a clue to the source of the problem and in any case it lets me use the Anaconda distribution out of the box.

I have a fresh new install of anaconda distribution. I have no large arrays. See attachment for my full conda list (IPython 7.4.0 in Spyder 3.3.3 in Mojave 10.14.4). I have the same symptoms others have noted:

  • Commands entered in IPython console wrongly elicit the ...: prompt.
  • Forcing execution with shift-return results in enormous delays. During this delay the "interrupt" square turns red. Somebody is doing a lot of something apparently.
  • Executing code in the code window works fine, no problem.
  • Turning off balloon tips doesn't help.
  • Restarting the mac doesn't help. Relaunching Spyder doesn't help.
    If downgrading some component is still the best answer, please let me know that, or whatever is better. Greatly appreciated. PN
    2019-04-08setup.txt

I've been getting the exact same issue!!! I could give the console window something as easy as
5 + 7 to calculate and it takes forever. switching backend automatic --> tkinter did NOTHING for me.
What seems to work (so far!) is conda install ipython=6 ipykernel=4. Odd that downgrading all those packages improves things.

ipykernel=4.

As noted above, this appears to be the one that really matters, There is some interaction going on with macOS, QtConsole and ipykernel 5 that we need to track down, which is difficult since we don't have many developers on macOS.

@goanpeca , any luck taking a look that this? Thanks!

I just experienced an event that may help shed new light on this problem.
I recently started using Spyder 4.0.0b2 (launched from its own dedicated environment) and experienced the issue we've described in this thread for the first time since downgrading ipykernel. This was unexpected since my console environment is still using ipykernel=4.10.0. I just decided to check Spyder's internal console in which the following traceback was printed

This console is used to report application
internal errors and to inspect Spyder
internals with the following commands:
  spy.app, spy.window, dir(spy)

Please don't use it to run your code

>>> Traceback (most recent call last):
  File "/Users/rclary/anaconda3/envs/spyder-beta/lib/python3.7/site-packages/spyder/plugins/profiler/widgets/profilergui.py", line 271, in <lambda>
    self.finished(ec, es))
  File "/Users/rclary/anaconda3/envs/spyder-beta/lib/python3.7/site-packages/spyder/plugins/profiler/widgets/profilergui.py", line 342, in finished
    self.show_data(justanalyzed=True)
  File "/Users/rclary/anaconda3/envs/spyder-beta/lib/python3.7/site-packages/spyder/plugins/profiler/widgets/profilergui.py", line 369, in show_data
    self.datatree.show_tree()
  File "/Users/rclary/anaconda3/envs/spyder-beta/lib/python3.7/site-packages/spyder/plugins/profiler/widgets/profilergui.py", line 541, in show_tree
    rootkey = self.find_root()  # This root contains profiler overhead
  File "/Users/rclary/anaconda3/envs/spyder-beta/lib/python3.7/site-packages/spyder/plugins/profiler/widgets/profilergui.py", line 522, in find_root
    self.profdata.sort_stats("cumulative")
AttributeError: 'NoneType' object has no attribute 'sort_stats'

Perhaps I accidentally hit "f10" to run the profiler which raised this error in the internal console. Note, however that there was no command prompt following the traceback. Within the internal console, then, I simply hit the return key, thus restoring a command prompt >>> after the traceback. The slow behavior _immediately_ went away in the ipython console; I did not have to restart the ipython kernel or close/open a new console or restart Spyder.

The actual error in the internal console may not be relevant to this issue, but I think somehow the absence of a command prompt is relevant. Any thoughts?

I had this problem after updating Spyder from 3.2.x to 3.3.5. Updating also caused an issue of packages going missing which may or may not have been related. The problem unexpectedly went away after installing nltk and updating conda-build. It's a haystack to find the exact cause, but perhaps someone can find a clue.

OSX Mojave 10.14.5
Spyder 3.3.5
Python 3.6.6
Qt 5.9.6
ipykernel 5.1.1
ipython 7.6.0

Installing nltk brought a suite of packages.

The following NEW packages will be INSTALLED:

  _anaconda_depends  pkgs/main/osx-64::_anaconda_depends-2019.03-py36_0
  anaconda-project   pkgs/main/noarch::anaconda-project-0.8.3-py_0
  appscript          pkgs/main/osx-64::appscript-1.1.0-py36h1de35cc_0
  astropy            pkgs/main/osx-64::astropy-3.2.1-py36h1de35cc_0
  atomicwrites       pkgs/main/osx-64::atomicwrites-1.3.0-py36_1
  backports.os       pkgs/main/osx-64::backports.os-0.1.1-py36_0
  backports.shutil_~ pkgs/main/osx-64::backports.shutil_get_terminal_size-1.0.0-py36_2
  bitarray           pkgs/main/osx-64::bitarray-0.9.3-py36h1de35cc_0
  bkcharts           pkgs/main/osx-64::bkcharts-0.2-py36h073222e_0
  blosc              pkgs/main/osx-64::blosc-1.16.3-hd9629dc_0
  bokeh              pkgs/main/osx-64::bokeh-1.2.0-py36_0
  boto               pkgs/main/osx-64::boto-2.49.0-py36_0
  bottleneck         pkgs/main/osx-64::bottleneck-1.2.1-py36h1d22016_1
  colorama           pkgs/main/osx-64::colorama-0.4.1-py36_0
  contextlib2        pkgs/main/osx-64::contextlib2-0.5.5-py36hd66e5e7_0
  curl               pkgs/main/osx-64::curl-7.64.1-ha441bb4_0
  cython             pkgs/main/osx-64::cython-0.29.11-py36h0a44026_0
  cytoolz            pkgs/main/osx-64::cytoolz-0.9.0.1-py36h1de35cc_1
  dask               pkgs/main/noarch::dask-2.1.0-py_0
  dask-core          pkgs/main/noarch::dask-core-2.1.0-py_0
  distributed        pkgs/main/noarch::distributed-2.1.0-py_0
  et_xmlfile         pkgs/main/osx-64::et_xmlfile-1.0.1-py36h1315bdc_0
  fastcache          pkgs/main/osx-64::fastcache-1.1.0-py36h1de35cc_0
  flask              pkgs/main/osx-64::flask-1.0.3-py36_0
  get_terminal_size  pkgs/main/osx-64::get_terminal_size-1.0.0-h7520d66_0
  gevent             pkgs/main/osx-64::gevent-1.4.0-py36h1de35cc_0
  gmp                pkgs/main/osx-64::gmp-6.1.2-hb37e062_1
  gmpy2              pkgs/main/osx-64::gmpy2-2.0.8-py36h6ef4df4_2
  greenlet           pkgs/main/osx-64::greenlet-0.4.15-py36h1de35cc_0
  h5py               pkgs/main/osx-64::h5py-2.9.0-py36h3134771_0
  hdf5               pkgs/main/osx-64::hdf5-1.10.4-hfa1e0ec_0
  heapdict           pkgs/main/osx-64::heapdict-1.0.0-py36_2
  html5lib           pkgs/main/osx-64::html5lib-1.0.1-py36_0
  imageio            pkgs/main/osx-64::imageio-2.5.0-py36_0
  importlib_metadata pkgs/main/osx-64::importlib_metadata-0.17-py36_1
  ipywidgets         pkgs/main/osx-64::ipywidgets-7.4.2-py36_0
  itsdangerous       pkgs/main/osx-64::itsdangerous-1.1.0-py36_0
  jbig               pkgs/main/osx-64::jbig-2.1-h4d881f8_0
  jdcal              pkgs/main/noarch::jdcal-1.4.1-py_0
  jupyter            pkgs/main/osx-64::jupyter-1.0.0-py36_7
  jupyter_console    pkgs/main/osx-64::jupyter_console-6.0.0-py36_0
  jupyterlab         pkgs/main/osx-64::jupyterlab-0.35.5-py36hf63ae98_0
  jupyterlab_server  pkgs/main/osx-64::jupyterlab_server-0.2.0-py36_0
  krb5               pkgs/main/osx-64::krb5-1.16.1-hddcf347_7
  libcurl            pkgs/main/osx-64::libcurl-7.64.1-h051b688_0
  libssh2            pkgs/main/osx-64::libssh2-1.8.2-ha12b0ac_0
  libxslt            pkgs/main/osx-64::libxslt-1.1.33-h33a18ac_0
  llvmlite           pkgs/main/osx-64::llvmlite-0.29.0-py36h98b8051_0
  locket             pkgs/main/osx-64::locket-0.2.0-py36hca03003_1
  lxml               pkgs/main/osx-64::lxml-4.3.4-py36hef8c89e_0
  mock               pkgs/main/osx-64::mock-3.0.5-py36_0
  more-itertools     pkgs/main/osx-64::more-itertools-7.0.0-py36_0
  mpc                pkgs/main/osx-64::mpc-1.1.0-h6ef4df4_1
  mpfr               pkgs/main/osx-64::mpfr-4.0.1-h3018a27_3
  mpmath             pkgs/main/osx-64::mpmath-1.1.0-py36_0
  msgpack-python     pkgs/main/osx-64::msgpack-python-0.6.1-py36h04f5b5a_1
  multipledispatch   pkgs/main/osx-64::multipledispatch-0.6.0-py36_0
  networkx           pkgs/main/noarch::networkx-2.3-py_0
  nltk               pkgs/main/osx-64::nltk-3.4.3-py36_0
  nose               pkgs/main/osx-64::nose-1.3.7-py36_2
  notebook           pkgs/main/osx-64::notebook-5.7.8-py36_0
  numba              pkgs/main/osx-64::numba-0.44.1-py36h6440ff4_0
  numexpr            pkgs/main/osx-64::numexpr-2.6.9-py36h7413580_0
  openpyxl           pkgs/main/noarch::openpyxl-2.6.2-py_0
  partd              pkgs/main/noarch::partd-1.0.0-py_0
  path.py            pkgs/main/noarch::path.py-12.0.1-py_0
  pathlib2           pkgs/main/osx-64::pathlib2-2.3.4-py36_0
  patsy              pkgs/main/osx-64::patsy-0.5.1-py36_0
  pep8               pkgs/main/osx-64::pep8-1.7.1-py36_0
  pluggy             pkgs/main/noarch::pluggy-0.12.0-py_0
  ply                pkgs/main/osx-64::ply-3.11-py36_0
  prometheus_client  pkgs/main/noarch::prometheus_client-0.7.1-py_0
  py                 pkgs/main/osx-64::py-1.8.0-py36_0
  pycrypto           pkgs/main/osx-64::pycrypto-2.6.1-py36h1de35cc_9
  pycurl             pkgs/main/osx-64::pycurl-7.43.0.3-py36ha12b0ac_0
  pyodbc             pkgs/main/osx-64::pyodbc-4.0.26-py36h0a44026_0
  pytables           pkgs/main/osx-64::pytables-3.5.2-py36h5bccee9_1
  pytest             pkgs/main/osx-64::pytest-5.0.0-py36_0
  pytest-arraydiff   pkgs/main/osx-64::pytest-arraydiff-0.3-py36h39e3cac_0
  pytest-astropy     pkgs/main/osx-64::pytest-astropy-0.5.0-py36_0
  pytest-doctestplus pkgs/main/osx-64::pytest-doctestplus-0.3.0-py36_0
  pytest-openfiles   pkgs/main/osx-64::pytest-openfiles-0.3.2-py36_0
  pytest-remotedata  pkgs/main/osx-64::pytest-remotedata-0.3.1-py36_0
  pywavelets         pkgs/main/osx-64::pywavelets-1.0.3-py36h1d22016_1
  scikit-image       pkgs/main/osx-64::scikit-image-0.15.0-py36h0a44026_0
  seaborn            pkgs/main/osx-64::seaborn-0.9.0-py36_0
  send2trash         pkgs/main/osx-64::send2trash-1.5.0-py36_0
  simplegeneric      pkgs/main/osx-64::simplegeneric-0.8.1-py36_2
  singledispatch     pkgs/main/osx-64::singledispatch-3.4.0.3-py36hf20db9d_0
  snappy             pkgs/main/osx-64::snappy-1.1.7-he62c110_3
  sortedcollections  pkgs/main/osx-64::sortedcollections-1.1.2-py36_0
  sortedcontainers   pkgs/main/osx-64::sortedcontainers-2.1.0-py36_0
  sphinxcontrib      pkgs/main/osx-64::sphinxcontrib-1.0-py36_1
  sphinxcontrib-web~ pkgs/main/noarch::sphinxcontrib-websupport-1.1.2-py_0
  sqlalchemy         pkgs/main/osx-64::sqlalchemy-1.3.5-py36h1de35cc_0
  statsmodels        pkgs/main/osx-64::statsmodels-0.10.0-py36h1d22016_0
  sympy              pkgs/main/osx-64::sympy-1.4-py36_0
  tblib              pkgs/main/noarch::tblib-1.4.0-py_0
  terminado          pkgs/main/osx-64::terminado-0.8.2-py36_0
  toolz              pkgs/main/osx-64::toolz-0.9.0-py36_0
  unicodecsv         pkgs/main/osx-64::unicodecsv-0.14.1-py36he531d66_0
  unixodbc           pkgs/main/osx-64::unixodbc-2.3.7-h1de35cc_0
  werkzeug           pkgs/main/noarch::werkzeug-0.15.4-py_0
  widgetsnbextension pkgs/main/osx-64::widgetsnbextension-3.4.2-py36_0
  xlrd               pkgs/main/osx-64::xlrd-1.2.0-py36_0
  xlsxwriter         pkgs/main/noarch::xlsxwriter-1.1.8-py_0
  xlwings            pkgs/main/osx-64::xlwings-0.15.8-py36_0
  xlwt               pkgs/main/osx-64::xlwt-1.2.0-py36h5ad1178_0
  zict               pkgs/main/noarch::zict-1.0.0-py_0
  zipp               pkgs/main/noarch::zipp-0.5.1-py_0

The conda-build update updated a handful of packages, but nothing is apparent to me why it might've fixed the issue.

The following NEW packages will be INSTALLED:

  liblief            pkgs/main/osx-64::liblief-0.9.0-h2a1bed3_2
  py-lief            pkgs/main/osx-64::py-lief-0.9.0-py36h1413db1_2

The following packages will be REMOVED:

  backports.functools_lru_cache-1.5-py_2
  backports.tempfile-1.0-py_1
  backports.weakref-1.0.post1-py_1
  conda-verify-3.4.2-py_0
  future-0.17.1-py36_0

The following packages will be UPDATED:

  bzip2                                    1.0.6-h1de35cc_5 --> 1.0.7-h1de35cc_0
  cloudpickle                                    1.1.1-py_0 --> 1.2.1-py_0
  conda-build                                  3.4.1-py36_0 --> 3.18.7-py36_0
  conda-package-han~                          1.3.10-py36_0 --> 1.3.11-py36_0
  glob2                  pkgs/main/osx-64::glob2-0.6-py36_1 --> pkgs/main/noarch::glob2-0.7-py_0
  ipython                              7.6.0-py36h39e3cac_0 --> 7.6.1-py36h39e3cac_0
  isort                                       4.3.20-py36_0 --> 4.3.21-py36_0
  jupyter_core       pkgs/main/osx-64::jupyter_core-4.4.0-~ --> pkgs/main/noarch::jupyter_core-4.5.0-py_0
  parso                                          0.4.0-py_0 --> 0.5.0-py_0
  psutil                               5.6.2-py36h1de35cc_0 --> 5.6.3-py36h1de35cc_0
  python-libarchive~                             2.8-py36_6 --> 2.8-py36_10
  pyyaml                                 5.1-py36h1de35cc_0 --> 5.1.1-py36h1de35cc_0
  qtpy                                           1.7.1-py_0 --> 1.8.0-py_0
  snowballstemmer    pkgs/main/osx-64::snowballstemmer-1.2~ --> pkgs/main/noarch::snowballstemmer-1.9.0-py_0
  sphinx                                         2.1.0-py_0 --> 2.1.2-py_0
  tornado                              6.0.2-py36h1de35cc_0 --> 6.0.3-py36h1de35cc_0
  wrapt                               1.11.1-py36h1de35cc_0 --> 1.11.2-py36h1de35cc_0

I just wanted to mention another workaround I have not seen here. Spyder creates a symbol for each ipython console in the dock. Code gets executed immediately, if you click on the symbol belonging to the console. Of course it is still annoying to do that almost every time.

I just wanted to mention another workaround I have not seen here. Spyder creates a symbol for each ipython console in the dock. Code gets executed immediately, if you click on the symbol belonging to the console. Of course it is still annoying to do that almost every time.

Command+tab to the python "application" also resolves the ipython hangs for me. Running ipython=6.4 and ipykernel=4.1.

I've noticed that the hangs tend to happen after switching applications, and then switching to the python application moves it along. Is there a way to keep the python application more active in OSX?

Thanks for your detailed description, @mblatch . We have made looking into this issue a higher priority and are dedicating our limited resources accordingly, so we really appreciate your help (and your patience) as we work to try to track down and resolve this.

Just FYI, in case anyone is not already aware, you can simply press Shift-Enter to always execute on the current input rather than going to the next line even if you are on a continuation (...), Ctrl-Enter does the opposite.

I think the reason the continuation prompt (:...) is shown is just a symptom of the kernel being slow / not responding: every time a command is enter, a message is sent to the console to ask if this command is complete or if a new line should be added (think a + (0, or while True:). If the kernel doesn't answer, then the console will decide that the input is not complete and insert a continuation prompt instead.

A good test to see if this is related to https://github.com/jupyter/qtconsole/issues/380 is to enter:
start = time.time(); time.sleep(0.0005); print(time.time() - start)
And see how much time it takes. It looks like under mac the matplotlib qt5 backend blocks something.

Until https://github.com/matplotlib/matplotlib/issues/15314 is fixed, I would avoid using the following matplotlib backends on macos: qt, qt5, osx.

Quentin Peter --
You directed us to https://pypi.org/project/appnope/
which says it's for OS X 10.9. Current MacOS is 10.14.6.
Phil Nelson

On Sep 21, 2019, at 3:32 PM, Quentin Peter notifications@github.com wrote:

I think this is caused by AppNap: https://developer.apple.com/library/archive/documentation/Performance/Conceptual/power_efficiency_guidelines_osx/AppNap.html
This can be desactivated by https://pypi.org/project/appnope/

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

App nap was adding in 10.9; that's likely what its referring to. The package hasn't been updated in a while, but it is apparently still maintained (given there's been activity as recent as 2018 on the repo) and unless Apple's completely changed their API for enabling/disabling it, there should be no reason why it shouldn't still work. You could open an issue on the issue to ask that the docs be clarified, but the best thing to do is just test it yourself and see if it actually disables App Nap.

I am using MacOS 10.14.6 and it is working for me

Disabling App Nap was the solution for me!
Thanks to everyone!

On Sun, Sep 22, 2019 at 2:33 AM Quentin Peter notifications@github.com
wrote:

I am using MacOS 10.14.6 and it is working for me

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/spyder-ide/spyder/issues/2902?email_source=notifications&email_token=ABAV7PHOYYU4AQTFZO4DD2DQK4GSPA5CNFSM4BX23L62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7I7PQI#issuecomment-533854145,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABAV7PB4VSV5DUYVSGUQOXLQK4GSPANCNFSM4BX23L6Q
.

@impact27 could you link the PR you opened ? Thanks!

All I did was follow Peter's suggestion & followed directions here:
This can be deactivated by https://pypi.org/project/appnope/

On Wed, Sep 25, 2019 at 1:37 PM Gonzalo Peña-Castellanos <
[email protected]> wrote:

@impact27 https://github.com/impact27 could you link the PR you opened
? Thanks!

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/spyder-ide/spyder/issues/2902?email_source=notifications&email_token=ABAV7PGO2P2IIETD2JYWAO3QLOOWHA5CNFSM4BX23L62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7SXGZY#issuecomment-535130983,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABAV7PFBDDGQW5IKYU54ENLQLOOWHANCNFSM4BX23L6Q
.

I think this is solved in ipykernel 5.1.3

This will be solved automatically in Spyder 4 for everyone that's using Python 3. Spyder 3 users need to be sure to update to ipykernel 5.1.3 or higher.

Unfortunately the fix was not backported to the Python 2 version of ipykernel, sorry.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

derDavidT picture derDavidT  Â·  62Comments

jdweaver picture jdweaver  Â·  77Comments

goanpeca picture goanpeca  Â·  106Comments

andreperesnl picture andreperesnl  Â·  128Comments

Khris777 picture Khris777  Â·  78Comments