运行命令jupyter notebook
时,出现以下错误:
Traceback (most recent call last):
File "/usr/local/bin/jupyter-notebook", line 6, in <module>
from notebook.notebookapp import main
File "/usr/local/lib/python3.5/dist-packages/notebook/notebookapp.py", line 47, in <module>
from zmq.eventloop import ioloop
File "/usr/local/lib/python3.5/dist-packages/zmq/eventloop/__init__.py", line 3, in <module>
from zmq.eventloop.ioloop import IOLoop
File "/usr/local/lib/python3.5/dist-packages/zmq/eventloop/ioloop.py", line 21, in <module>
from tornado import ioloop
File "/usr/local/lib/python3.5/dist-packages/tornado/ioloop.py", line 45, in <module>
from tornado.concurrent import (
File "/usr/local/lib/python3.5/dist-packages/tornado/concurrent.py", line 175, in <module>
future: Union["futures.Future[_T]", "Future[_T]"], value: _T
File "/usr/lib/python3.5/typing.py", line 552, in __getitem__
dict(self.__dict__), parameters, _root=True)
File "/usr/lib/python3.5/typing.py", line 512, in __new__
for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
File "/usr/lib/python3.5/typing.py", line 512, in <genexpr>
for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
File "/usr/lib/python3.5/typing.py", line 190, in __subclasscheck__
self._eval_type(globalns, localns)
File "/usr/lib/python3.5/typing.py", line 177, in _eval_type
eval(self.__forward_code__, globalns, localns),
File "<string>", line 1, in <module>
TypeError: 'type' object is not subscriptable
我不使用Anaconda。清洁python 3.5.2和pip3。
有人知道是什么问题吗?
答案 0 :(得分:4)
降级到龙卷风5.1.1将解决该问题。 当您使用pip3
sudo pip3 uninstall tornado
sudo pip3 install tornado==5.1.1