Jupyter笔记本正在localhost上运行,但是当我尝试在单元格中运行python脚本时,它会发出以下错误 -
[I 22:39:47.748 NotebookApp] Serving notebooks from local directory: /home/tiwari/Practice/note_book
[I 22:39:47.748 NotebookApp] 0 active kernels
[I 22:39:47.748 NotebookApp] The Jupyter Notebook is running at: http://localhost:8999/
[I 22:39:47.748 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 22:39:50.862 NotebookApp] Session not found: session_id=u'9c6cd3bd-9501-4f5c-9bc0-fa374f624012'
[W 22:39:50.864 NotebookApp] 404 DELETE /api/sessions/9c6cd3bd-9501-4f5c-9bc0-fa374f624012 (127.0.0.1) 4.25ms referer=http://localhost:8999/notebooks/packages/DataStructure/test_stack.ipynb
[I 22:39:50.895 NotebookApp] Kernel started: 0129ae3f-cb4f-4b1b-ac62-b3e4b68b4a3a
/usr/bin/python: cannot import name Empty; 'ipykernel' is a package and cannot be directly executed
[I 22:39:53.897 NotebookApp] KernelRestarter: restarting kernel (1/5)
/usr/bin/python: cannot import name Empty; 'ipykernel' is a package and cannot be directly executed
[I 22:39:56.900 NotebookApp] KernelRestarter: restarting kernel (2/5)
/usr/bin/python: cannot import name Empty; 'ipykernel' is a package and cannot be directly executed
[I 22:39:59.907 NotebookApp] KernelRestarter: restarting kernel (3/5)
/usr/bin/python: cannot import name Empty; 'ipykernel' is a package and cannot be directly executed
[W 22:40:00.933 NotebookApp] Timeout waiting for kernel_info reply from 0129ae3f-cb4f-4b1b-ac62-b3e4b68b4a3a
[I 22:40:02.911 NotebookApp] KernelRestarter: restarting kernel (4/5)
WARNING:root:kernel 0129ae3f-cb4f-4b1b-ac62-b3e4b68b4a3a restarted
/usr/bin/python: cannot import name Empty; 'ipykernel' is a package and cannot be directly executed
[W 22:40:05.916 NotebookApp] KernelRestarter: restart failed
[W 22:40:05.916 NotebookApp] Kernel 0129ae3f-cb4f-4b1b-ac62-b3e4b68b4a3a died, removing from map.
ERROR:root:kernel 0129ae3f-cb4f-4b1b-ac62-b3e4b68b4a3a restarted failed!
[W 22:40:05.927 NotebookApp] Kernel deleted before session
[W 22:40:05.927 NotebookApp] 410 DELETE /api/sessions/1de806ab-9800-47a2-bd00-19b0c501d52a (127.0.0.1) 1.84ms referer=http://localhost:8999/notebooks/packages/DataStructure/test_stack.ipynb