【发布时间】:2021-08-28 09:50:29
【问题描述】:
我在带有 Python 3.9.6 的 Windows 10 中使用 Jupyter Notebook。我已经使用此命令pip install jupyter 安装了 Jupyter Notebook,并使用此命令jupyter notebook 运行它。因此,在启动笔记本电脑后,在终端中我也看到了一些错误,但到目前为止,我似乎没有看到任何影响。但仍想检查一下,该错误实际上表明了什么,有没有办法修复它?
[I 18:25:02.479 NotebookApp] Serving notebooks from local directory: C:\Users\maryo\Desktop\python\jpnb
[I 18:25:02.479 NotebookApp] Jupyter Notebook 6.4.3 is running at:
[I 18:25:02.479 NotebookApp] http://localhost:8888/?token=dfd2534b828985fcc116e9c400fd31381e9c8f19034e39d3
[I 18:25:02.479 NotebookApp] or http://127.0.0.1:8888/?token=dfd2534b828985fcc116e9c400fd31381e9c8f19034e39d3
[I 18:25:02.479 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 18:25:02.508 NotebookApp]
To access the notebook, open this file in a browser:
file:///C:/Users/maryo/AppData/Roaming/jupyter/runtime/nbserver-17088-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=dfd2534b828985fcc116e9c400fd31381e9c8f19034e39d3
or http://127.0.0.1:8888/?token=dfd2534b828985fcc116e9c400fd31381e9c8f19034e39d3
c:\users\maryo\appdata\local\programs\python\python39\lib\json\encoder.py:257: UserWarning: date_default is deprecated since jupyter_client 7.0.0. Use jupyter_client.jsonutil.json_default.
return _iterencode(o, 0)
[W 18:27:49.960 NotebookApp] Notebook Covid Data Analysis.ipynb is not trusted
ERROR:asyncio:Exception in callback <TaskStepMethWrapper object at 0x000002C98ECD81F0>()
handle: <Handle <TaskStepMethWrapper object at 0x000002C98ECD81F0>()>
Traceback (most recent call last):
File "c:\users\maryo\appdata\local\programs\python\python39\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
RuntimeError: Cannot enter into task <Task pending name='Task-41' coro=<RequestHandler._execute() running at C:\Users\maryo\Desktop\python\jpnb\lib\site-packages\tornado\web.py:1660> cb=[_HandlerDelegate.execute.<locals>.<lambda>() at C:\Users\maryo\Desktop\python\jpnb\lib\site-packages\tornado\web.py:2326]> while another task <Task pending name='Task-40' coro=<MappingKernelManager.start_kernel() running at C:\Users\maryo\Desktop\python\jpnb\lib\site-packages\notebook\services\kernels\kernelmanager.py:176> cb=[IOLoop.add_future.<locals>.<lambda>() at C:\Users\maryo\Desktop\python\jpnb\lib\site-packages\tornado\ioloop.py:688]> is being executed.
ERROR:asyncio:Exception in callback <TaskStepMethWrapper object at 0x000002C98DA94880>()
handle: <Handle <TaskStepMethWrapper object at 0x000002C98DA94880>()>
Traceback (most recent call last):
File "c:\users\maryo\appdata\local\programs\python\python39\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
RuntimeError: Cannot enter into task <Task pending name='Task-30' coro=<HTTP1ServerConnection._server_request_loop() running at C:\Users\maryo\Desktop\python\jpnb\lib\site-packages\tornado\http1connection.py:840> cb=[IOLoop.add_future.<locals>.<lambda>() at C:\Users\maryo\Desktop\python\jpnb\lib\site-packages\tornado\ioloop.py:688]> while another task <Task pending name='Task-40' coro=<MappingKernelManager.start_kernel() running at C:\Users\maryo\Desktop\python\jpnb\lib\site-packages\notebook\services\kernels\kernelmanager.py:176> cb=[IOLoop.add_future.<locals>.<lambda>() at C:\Users\maryo\Desktop\python\jpnb\lib\site-packages\tornado\ioloop.py:688]> is being executed.
C:\Users\maryo\Desktop\python\jpnb\lib\site-packages\jupyter_client\ioloop\manager.py:9: RuntimeWarning: coroutine 'RequestHandler._execute' was never awaited
from .restarter import AsyncIOLoopKernelRestarter
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
ERROR:asyncio:Task was destroyed but it is pending!
task: <Task pending name='Task-41' coro=<RequestHandler._execute() running at C:\Users\maryo\Desktop\python\jpnb\lib\site-packages\tornado\web.py:1660> cb=[_HandlerDelegate.execute.<locals>.<lambda>() at C:\Users\maryo\Desktop\python\jpnb\lib\site-packages\tornado\web.py:2326]>
【问题讨论】:
-
请参阅 this github issue 以获得解释和修复。
标签: python-3.x windows jupyter-notebook