Upgrading to the most recent version (4.3) to honor notebook's install_requires 'tornado>=4', I get a syntax error as tornado is using asyncio with python3.4 syntax. I did a downgrade with pip install tornado==4.1 and is able to start ipython2 notebook.
Either my setup is in a bad state or there is a issue with the requirement.
The raise ... from issue still appears with tornado==4.1.
$ python2
>>> import tornado
>>> tornado.version
'4.1'
>>> import tornado.platform.asyncio
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/tornado/platform/asyncio.py", line 23, in <module>
import asyncio
File "/usr/local/lib/python2.7/dist-packages/asyncio/__init__.py", line 9, in <module>
from . import selectors
File "/usr/local/lib/python2.7/dist-packages/asyncio/selectors.py", line 39
"{!r}".format(fileobj)) from None
^
SyntaxError: invalid syntax
Nevertheless, with tornado==4.1 the notebook starts.
My setup was in a bad state. Exchanging asyncio with trollius helped.
$ sudo pip2 uninstall asyncio
$ sudo pip2 install trollius
I cannot find a requirement of asyncio in tornado or notebook, so it might have been my own setup that was wrong. Thus I am closing the issue.
Thanks, I think it should also be taken care by python-requires option in tornado that should say it can only be installed on 3.5+ if it is the case.
@fnielsen your comment just got me out of a half day of broken setup++++++++
Most helpful comment
My setup was in a bad state. Exchanging asyncio with trollius helped.
I cannot find a requirement of asyncio in tornado or notebook, so it might have been my own setup that was wrong. Thus I am closing the issue.