Spyder: Spyder fails to link to IPython console on startup due to tornado upgrade to 5.0

Created on 7 Mar 2018  路  12Comments  路  Source: spyder-ide/spyder

Problem Description

spyder failed linking to ipython console on startup, after tornado upgraded to 5.0

What steps will reproduce the problem?

  1. conda update --all (upgrade tornado to 5.0)
  2. run spyder
  3. an error windows appears when spyder UI is shown. ipython console connection cannot be established (with a circle rotating in the console, which means it's connecting, but it never ends)

What is the expected output? What do you see instead?

Paste Traceback/Error Below (if applicable)

  File "/home/lee1984/anaconda3/lib/python3.6/site-packages/spyder/plugins/__init__.py", line 514, in <lambda>
    toggled=lambda checked: self.toggle_view(checked),
  File "/home/lee1984/anaconda3/lib/python3.6/site-packages/spyder/plugins/ipythonconsole.py", line 725, in toggle_view
    self.create_new_client(give_focus=False)
  File "/home/lee1984/anaconda3/lib/python3.6/site-packages/spyder/plugins/ipythonconsole.py", line 1038, in create_new_client
    self.connect_client_to_kernel(client)
  File "/home/lee1984/anaconda3/lib/python3.6/site-packages/spyder/plugins/ipythonconsole.py", line 1073, in connect_client_to_kernel
    kc.start_channels(shell=True, iopub=True)
  File "/home/lee1984/anaconda3/lib/python3.6/site-packages/qtconsole/kernel_mixins.py", line 43, in start_channels
    super(QtKernelClientMixin, self).start_channels(*args, **kw)
  File "/home/lee1984/anaconda3/lib/python3.6/site-packages/jupyter_client/threaded.py", line 212, in start_channels
    self.shell_channel._inspect = self._check_kernel_info_reply
  File "/home/lee1984/anaconda3/lib/python3.6/site-packages/jupyter_client/client.py", line 143, in shell_channel
    socket, self.session, self.ioloop
  File "/home/lee1984/anaconda3/lib/python3.6/site-packages/jupyter_client/threaded.py", line 205, in ioloop
    self._ioloop = ioloop.IOLoop()
  File "/home/lee1984/anaconda3/lib/python3.6/site-packages/tornado/util.py", line 312, in __new__
    instance.initialize(*args, **init_kwargs)
  File "/home/lee1984/anaconda3/lib/python3.6/site-packages/zmq/eventloop/ioloop.py", line 139, in initialize
    super(ZMQIOLoop, self).initialize(impl=impl, **kwargs)
  File "/home/lee1984/anaconda3/lib/python3.6/site-packages/tornado/ioloop.py", line 845, in initialize
    super(PollIOLoop, self).initialize(**kwargs)
  File "/home/lee1984/anaconda3/lib/python3.6/site-packages/tornado/ioloop.py", line 357, in initialize
    self.make_current()
  File "/home/lee1984/anaconda3/lib/python3.6/site-packages/tornado/ioloop.py", line 315, in make_current
    assert asyncio is None
AssertionError

Package Versions

  • Spyder: 3.2.7
  • Python: 3.6.4
  • Qt: 5.6.2
  • PyQt: 5.5.6
  • Operating System: Lubuntu 1604

Problem solution:
Downgrade tornado to 4.5.3 by running command:
conda install tornado=4.5.3

NotSpyder

Most helpful comment

A good news.
Today I tried "conda update --all" again, and it has added "pyzmq 17" in the update list. After installed pyzmq 17 and tornado 5.0 now everything works fine.

All 12 comments

Yeah, not our problem, sorry. i think this is also fixed by installing pyzmq 17. New conda packages for it should be available soon.

For maximum clarity, the solution for now is to run conda install tornado=4.5.3 from the Anaconda Prompt/Terminal/shell (Windows/Mac/Linux) in the conda environment that Spyder is installed in.

Thank you so much! it is working now!

conda install tornado=4.5.3 on the conda terminal did the trick. Thank you!

A good news.
Today I tried "conda update --all" again, and it has added "pyzmq 17" in the update list. After installed pyzmq 17 and tornado 5.0 now everything works fine.

Excellent news indeed! Hopefully this will stem the flood of error reports we've received in the past 24 hours...

For info, conda update pyzmq 17 did not do the trick for me but conda update --all did. I am not sure which package was important.

Possibly ipykernel?

The problem still exists! This sucks!

@jamessong Did you try all the solutions given here? Most likely if so, this is not the same problem, and due to some later update of some dependency package. Try using the official versions in the Anaconda 5.3.0 metapackage, or try creating a fresh new environment and installing Spyder in that.

tried all sort of stuff conda update --all is the only one has worked for me. I guess trouble these days is there are so many dependencies we have no idea which one(s) to cause the problem.

In addition to updating everything with conda update --all, I had to delete the ~/.ipython and ~/.spyder-py3 directories. Not sure which one was the issue at this point, and whether the update was even necessary.

Was this page helpful?
0 / 5 - 0 ratings