Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very slow line execution using IPython in macOS #2902

Closed
jeffak opened this issue Jan 5, 2016 · 115 comments · Fixed by spyder-ide/spyder-kernels#177
Closed

Very slow line execution using IPython in macOS #2902

jeffak opened this issue Jan 5, 2016 · 115 comments · Fixed by spyder-ide/spyder-kernels#177

Comments

@jeffak
Copy link

jeffak commented Jan 5, 2016

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.

@ibackus
Copy link

ibackus commented Jun 3, 2016

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)

@ccordoba12 ccordoba12 modified the milestones: todo, Not sorted Oct 11, 2018
@jjruby09
Copy link

jjruby09 commented Nov 19, 2018

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

@ghost
Copy link

ghost commented Nov 20, 2018

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

@jennifereldiaz
Copy link

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
Copy link

jjruby09 commented Nov 21, 2018

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)

@ghost
Copy link

ghost commented Nov 23, 2018

thanks for this temporary solution @jjruby09 !

@jennifereldiaz
Copy link

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

@ccordoba12
Copy link
Member

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

@jjruby09
Copy link

@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

@jennifereldiaz
Copy link

jennifereldiaz commented Nov 28, 2018

@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.

@charlieroecss
Copy link

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

@ccordoba12
Copy link
Member

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

@charlieroecss
Copy link

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

@ccordoba12
Copy link
Member

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

@jjruby09
Copy link

jjruby09 commented Dec 3, 2018

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

@nealtanner
Copy link

nealtanner commented Dec 3, 2018

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.

@sitadrost
Copy link

sitadrost commented Dec 4, 2018

@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

@ccordoba12
Copy link
Member

@sitadrost, could you also downgrade IPython to 6.5.0?

@sitadrost
Copy link

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

@jennifereldiaz
Copy link

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

@sitadrost
Copy link

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'

@ccordoba12
Copy link
Member

@sitadrost, that error was fixed in Spyder 3.3

@ghost
Copy link

ghost commented Dec 5, 2018

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

same here @ccordoba12

@mrclary
Copy link
Contributor

mrclary commented Jun 21, 2019

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?

@jonoco
Copy link

jonoco commented Jul 11, 2019

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

@sziem
Copy link

sziem commented Jul 17, 2019

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.

@achennings
Copy link

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?

@impact27
Copy link
Contributor

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.

@impact27
Copy link
Contributor

A good test to see if this is related to jupyter/qtconsole#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.

@impact27
Copy link
Contributor

impact27 commented Sep 20, 2019

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

@impact27
Copy link
Contributor

@NelsonUpenn
Copy link

NelsonUpenn commented Sep 22, 2019 via email

@CAM-Gerlach
Copy link
Member

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.

@impact27
Copy link
Contributor

I am using MacOS 10.14.6 and it is working for me

@dansamber
Copy link

dansamber commented Sep 25, 2019 via email

@goanpeca
Copy link
Member

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

@dansamber
Copy link

dansamber commented Sep 25, 2019 via email

@impact27
Copy link
Contributor

Here is the PR: ipython/ipykernel#441

@impact27
Copy link
Contributor

I think this is solved in ipykernel 5.1.3

@ccordoba12
Copy link
Member

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.