Jupyter ноутбук не может запустить ядро - PullRequest
0 голосов
/ 29 октября 2018

Я новичок в записной книжке Jupyter, когда пытаюсь создать записную книжку Jupyter, не удается запустить ядро, показывая следующее сообщение об ошибке, моя версия python 3.5.2 и версия jupyter 4.2.0:

Traceback (most recent call last):
  File "/home/andy/anaconda3/lib/python3.5/site-packages/traitlets/traitlets.py", line 526, in get
    value = obj._trait_values[self.name]
KeyError: 'loop'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/andy/anaconda3/lib/python3.5/site-packages/notebook/base/handlers.py", line 457, in wrapper
    result = yield gen.maybe_future(method(self, *args, **kwargs))
  File "/home/andy/.local/lib/python3.5/site-packages/tornado/gen.py", line 1133, in run
    value = future.result()
  File "/home/andy/anaconda3/lib/python3.5/asyncio/futures.py", line 274, in result
    raise self._exception
  File "/home/andy/.local/lib/python3.5/site-packages/tornado/gen.py", line 1141, in run
    yielded = self.gen.throw(*exc_info)
  File "/home/andy/anaconda3/lib/python3.5/site-packages/notebook/services/sessions/handlers.py", line 62, in post
    kernel_id=kernel_id))
  File "/home/andy/.local/lib/python3.5/site-packages/tornado/gen.py", line 1133, in run
    value = future.result()
  File "/home/andy/anaconda3/lib/python3.5/asyncio/futures.py", line 274, in result
    raise self._exception
  File "/home/andy/.local/lib/python3.5/site-packages/tornado/gen.py", line 1141, in run
    yielded = self.gen.throw(*exc_info)
  File "/home/andy/anaconda3/lib/python3.5/site-packages/notebook/services/sessions/sessionmanager.py", line 79, in create_session
    kernel_name)
  File "/home/andy/.local/lib/python3.5/site-packages/tornado/gen.py", line 1133, in run
    value = future.result()
  File "/home/andy/anaconda3/lib/python3.5/asyncio/futures.py", line 274, in result
    raise self._exception
  File "/home/andy/.local/lib/python3.5/site-packages/tornado/gen.py", line 1141, in run
    yielded = self.gen.throw(*exc_info)
  File "/home/andy/anaconda3/lib/python3.5/site-packages/notebook/services/sessions/sessionmanager.py", line 92, in start_kernel_for_session
    self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
  File "/home/andy/.local/lib/python3.5/site-packages/tornado/gen.py", line 1133, in run
    value = future.result()
  File "/home/andy/anaconda3/lib/python3.5/asyncio/futures.py", line 274, in result
    raise self._exception
  File "/home/andy/.local/lib/python3.5/site-packages/tornado/gen.py", line 326, in wrapper
    yielded = next(result)
  File "/home/andy/anaconda3/lib/python3.5/site-packages/notebook/services/kernels/kernelmanager.py", line 87, in start_kernel
    super(MappingKernelManager, self).start_kernel(**kwargs)
  File "/home/andy/anaconda3/lib/python3.5/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
    km.start_kernel(**kwargs)
  File "/home/andy/anaconda3/lib/python3.5/site-packages/jupyter_client/manager.py", line 258, in start_kernel
    self.start_restarter()
  File "/home/andy/anaconda3/lib/python3.5/site-packages/jupyter_client/ioloop/manager.py", line 49, in start_restarter
    kernel_manager=self, loop=self.loop,
  File "/home/andy/anaconda3/lib/python3.5/site-packages/traitlets/traitlets.py", line 554, in __get__
    return self.get(obj, cls)
  File "/home/andy/anaconda3/lib/python3.5/site-packages/traitlets/traitlets.py", line 533, in get
    value = self._validate(obj, dynamic_default())
  File "/home/andy/anaconda3/lib/python3.5/site-packages/traitlets/traitlets.py", line 589, in _validate
    value = self.validate(obj, value)
  File "/home/andy/anaconda3/lib/python3.5/site-packages/traitlets/traitlets.py", line 1681, in validate
    self.error(obj, value)
  File "/home/andy/anaconda3/lib/python3.5/site-packages/traitlets/traitlets.py", line 1528, in error
    raise TraitError(e)
traitlets.traitlets.TraitError: The 'loop' trait of an IOLoopKernelManager instance must be a ZMQIOLoop, but a value of class 'tornado.platform.asyncio.AsyncIOMainLoop' (i.e. <tornado.platform.asyncio.AsyncIOMainLoop object at 0x7f1dd34e8ef0>) was specified.

И я также проверил ядро ​​с помощью следующей команды:

jupyter kernelspec list

Получить ниже результат:

Available kernels:
python3    /home/andy/anaconda3/share/jupyter/kernels/python3

Кто-нибудь может мне помочь?

1 Ответ

0 голосов
/ 02 ноября 2018

Jupyter 4.2.0 довольно старый и не совместим с версиями Tornado новее 5.0. Вам нужно либо перейти на более новую версию Jupyter, либо перейти на более старую версию Tornado (с pip это будет pip install "tornado<5.0". Я не знаю эквивалента conda)

...