spyder: Console stuck in connecting to kernel upon starting spyder
Problem Description
What steps will reproduce the problem?
Starting spyder after the latest update. Console is stuck in “connecting to kernel”
Traceback
File "C:\Conda\envs\py36\lib\site-packages\spyder\plugins\__init__.py", line 514, in <lambda>
toggled=lambda checked: self.toggle_view(checked),
File "C:\Conda\envs\py36\lib\site-packages\spyder\plugins\ipythonconsole.py", line 725, in toggle_view
self.create_new_client(give_focus=False)
File "C:\Conda\envs\py36\lib\site-packages\spyder\plugins\ipythonconsole.py", line 1038, in create_new_client
self.connect_client_to_kernel(client)
File "C:\Conda\envs\py36\lib\site-packages\spyder\plugins\ipythonconsole.py", line 1073, in connect_client_to_kernel
kc.start_channels(shell=True, iopub=True)
File "C:\Conda\envs\py36\lib\site-packages\qtconsole\kernel_mixins.py", line 43, in start_channels
super(QtKernelClientMixin, self).start_channels(*args, **kw)
File "C:\Conda\envs\py36\lib\site-packages\jupyter_client\threaded.py", line 212, in start_channels
self.shell_channel._inspect = self._check_kernel_info_reply
File "C:\Conda\envs\py36\lib\site-packages\jupyter_client\client.py", line 143, in shell_channel
socket, self.session, self.ioloop
File "C:\Conda\envs\py36\lib\site-packages\jupyter_client\threaded.py", line 205, in ioloop
self._ioloop = ioloop.IOLoop()
File "C:\Conda\envs\py36\lib\site-packages\tornado\util.py", line 312, in __new__
instance.initialize(*args, **init_kwargs)
File "C:\Conda\envs\py36\lib\site-packages\zmq\eventloop\ioloop.py", line 139, in initialize
super(ZMQIOLoop, self).initialize(impl=impl, **kwargs)
File "C:\Conda\envs\py36\lib\site-packages\tornado\ioloop.py", line 845, in initialize
super(PollIOLoop, self).initialize(**kwargs)
File "C:\Conda\envs\py36\lib\site-packages\tornado\ioloop.py", line 357, in initialize
self.make_current()
File "C:\Conda\envs\py36\lib\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.10.0
- PyQt5 5.10
- Windows 10
Dependencies
pyflakes >=0.6.0 : 1.6.0 (OK)
pycodestyle >=2.3: 2.3.1 (OK)
pygments >=2.0 : 2.2.0 (OK)
pandas >=0.13.1 : 0.22.0 (OK)
numpy >=1.7 : 1.14.1 (OK)
sphinx >=0.6.6 : 1.7.1 (OK)
rope >=0.9.4 : 0.10.7 (OK)
jedi >=0.9.0 : 0.11.1 (OK)
nbconvert >=4.0 : 5.3.1 (OK)
sympy >=0.7.3 : 1.1.1 (OK)
cython >=0.21 : 0.27.3 (OK)
qtconsole >=4.2.0: 4.3.1 (OK)
IPython >=4.0 : 6.2.1 (OK)
pylint >=0.25 : 1.8.2 (OK)
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 15 (4 by maintainers)
Downgrading tornado back to 4.5.3 fixed the issue.
pip install ipykernel --upgrade
I tried pip install tornado==4.5.3, and the issue was solved
I t worked for me. Thanks!
I first updated ipykernel:
conda upgrade ipykernelNext, I downgraded tornado:conda install tornado=4.5.3Done, problem solved in Spyder using Python 3.7 (Anaconda distribution) in windows 10.
I had the same problem and doing “conda update --all” solved the problem. This solution was proposed on [https://github.com/spyder-ide/spyder/issues/6627](issue 6627)
Note: If you do this while an existing kernel is open, you will be able to connect to it, but you will not see any output or errors in the IPython console. You will need to restart the kernel (or leave it (“quit”) and start another) for it to work properly.
unable to fix the issue even after installing tornado 4.5.3
This is a duplicate of #6627 ; and in any case outside of Spyder’s control. To fix for now, run
conda install tornado=4.5.3from the Anaconda Prompt/Terminal/shell (Windows/Mac/Linux) in thecondaenvironment that Spyder is installed in.