After updating to tornado=5.0 using conda update --all -y, jupyter notebook cannot start and was throwing errors:
$ jupyter notebook&
[1] 3527
Traceback (most recent call last):
File "/home/chenchen2015/anaconda3/bin/jupyter-notebook", line 7, in <module>
from notebook.notebookapp import main
File "/home/chenchen2015/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 45, in <module>
ioloop.install()
File "/home/chenchen2015/anaconda3/lib/python3.6/site-packages/zmq/eventloop/ioloop.py", line 210, in install
assert (not ioloop.IOLoop.initialized()) or \
AttributeError: type object 'IOLoop' has no attribute 'initialized'
This was seen on Ubuntu 17.10 with Anaconda 5.1.0 x64.
Similar to #3397, this is solved by manually downgrading back to tornado=4.5.3 with conda install tornado=4.5.3, hence it seems to be a breaking change caused by tornado 5.0 releases
You need to upgrade pyzmq to version 17, which is compatible with the new version of Tornado. Anaconda accidentally packaged Tornado 5 before packaging pyzmq 17, but they should have now packaged the latest pyzmq as well.
Good to know, thanks @takluyver
To be clear, our case was not anaconda, and it was getting everything on a fresh install from pip. We do not install pyzmq or tornado directly (although installing tornado directly did fix it).
Hello,
I'm having ta similar issue with pyzmq == 17.0.0 and tornado == 5.0.1. To be clear, jupyter is indeed able to start with pyzmq updated. However, as soon as starting a new notebook or restarting an old one, I get:
AttributeError: type object 'ZMQIOLoop' has no attribute 'initialized'
Downgrading tornado to 4.5.3 solves the issue.
Thanks
That probably means that your kernel is running in an environment where you still have an older version of pyzmq, while your notebook is running somewhere with a newer pyzmq.
Thanks - how would I diagnose this?
On Tue, Apr 3, 2018 at 10:20 AM, Thomas Kluyver notifications@github.com
wrote:
That probably means that your kernel is running in an environment where
you still have an older version of pyzmq, while your notebook is running
somewhere with a newer pyzmq.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/jupyter/notebook/issues/3407#issuecomment-378168358,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABI7KjD11074UBkPLLiSpboUnOhoV0Kxks5tkzDBgaJpZM4ShDMM
.
Use jupyter kernelspec list to see where your kernelspecs are. That shows you some folders - inside each one should be a kernel.json file pointing to which executable that kernelspec will use.
If there's an entry which ends with ipykernel/resources, then it won't have a kernel.json, and that kernel type will be launched with the same Python that the notebook server runs on.
This is strange, the kernels all point to the right place. All works fine
in a fresh environment, too.
On Tue, Apr 3, 2018 at 10:45 AM, Thomas Kluyver notifications@github.com
wrote:
Use jupyter kernelspec list to see where your kernelspecs are. That shows
you some folders - inside each one should be a kernel.json file pointing
to which executable that kernelspec will use.If there's an entry which ends with ipykernel/resources, then it won't
have a kernel.json, and that kernel type will be launched with the same
Python that the notebook server runs on.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/jupyter/notebook/issues/3407#issuecomment-378175147,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABI7Kn0LIk55pplOcj7B9gm2B1LdSI_Rks5tkzaagaJpZM4ShDMM
.
I have been having the same issue. I upgraded pyzmq to 17.0.0 globally and the issue has not been solved.
If you're getting the same traceback as in the original post, then it must be using an older version of pyzmq somewhere. Check for different virtualenvs/conda envs/Python versions.
thanks, it solved my problem
I followed all the update tornado and pyzmq suggestions, still same error in old conda env. I made a fresh conda env - no error. I made the comparison.
conda install jupyter
fixed my old conda env
Upgrading pyzmq didn't work for me, but as a few other recent comments here have mentioned, downgrading tornado did it!
Still a problem on OSX 10.13.6 (17G5019) with pip installed latest versions of everything and only the intended versions/environments for pyzmq/tornado/et al. Downgrading tornado to 4.5.3 still works.
Hello,
I'm having ta similar issue with pyzmq == 17.0.0 and tornado == 5.0.1. To be clear, jupyter is indeed able to start with pyzmq updated. However, as soon as starting a new notebook or restarting an old one, I get:
AttributeError: type object 'ZMQIOLoop' has no attribute 'initialized'Downgrading tornado to 4.5.3 solves the issue.
Thanks
Most helpful comment
You need to upgrade pyzmq to version 17, which is compatible with the new version of Tornado. Anaconda accidentally packaged Tornado 5 before packaging pyzmq 17, but they should have now packaged the latest pyzmq as well.