我正在使用以下命令使用Jupyter笔记本服务器创建一个全新的Python 3虚拟环境:
virtualenv env -p python3
. env/bin/activate
pip install jupyter
jupyter notebook
这些都成功运行。但是当我尝试创建一个新笔记本时,我收到WebSocket身份验证错误,无法创建笔记本。客户说
无法建立与笔记本电脑服务器的连接。笔记本电脑将继续尝试重新连接。检查网络连接或笔记本服务器配置。
以下是Jupyter笔记本服务器的日志:
[I 22:50:23.085 NotebookApp] The port 8888 is already in use, trying another port.
[I 22:50:23.110 NotebookApp] Serving notebooks from local directory: /tmp
[I 22:50:23.110 NotebookApp] 0 active kernels
[I 22:50:23.110 NotebookApp] The Jupyter Notebook is running at: http://localhost:8889/?token=b4d69926e308334a4ca121d3ceaa0dfa9f1ba93312770f88
[I 22:50:23.110 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 22:50:36.778 NotebookApp] Accepting one-time-token-authenticated connection from 127.0.0.1
[I 22:52:01.083 NotebookApp] Creating new notebook in
[W 22:52:06.372 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20161215225022 (127.0.0.1) 38.39ms referer=http://localhost:8889/notebooks/Untitled.ipynb?kernel_name=python3
[I 22:52:06.855 NotebookApp] Kernel started: 7b5db30f-e2b2-48dc-9ec8-2aa9bd63b604
[W 22:52:07.130 NotebookApp] Couldn't authenticate WebSocket connection
[W 22:52:07.140 NotebookApp] 403 GET /api/kernels/7b5db30f-e2b2-48dc-9ec8-2aa9bd63b604/channels?session_id=277CA36E71FA431C922EE9F8AEFF6261 (127.0.0.1) 14.42ms referer=None
[W 22:52:08.435 NotebookApp] Couldn't authenticate WebSocket connection
[W 22:52:08.446 NotebookApp] 403 GET /api/kernels/7b5db30f-e2b2-48dc-9ec8-2aa9bd63b604/channels?session_id=277CA36E71FA431C922EE9F8AEFF6261 (127.0.0.1) 16.36ms referer=None
WARNING: Attempting to work in a virtualenv. If you encounter problems, please install IPython inside the virtualenv.
[W 22:52:10.619 NotebookApp] Couldn't authenticate WebSocket connection
[W 22:52:10.622 NotebookApp] 403 GET /api/kernels/7b5db30f-e2b2-48dc-9ec8-2aa9bd63b604/channels?session_id=277CA36E71FA431C922EE9F8AEFF6261 (127.0.0.1) 10.53ms referer=None
[W 22:52:14.657 NotebookApp] Couldn't authenticate WebSocket connection
[W 22:52:14.666 NotebookApp] 403 GET /api/kernels/7b5db30f-e2b2-48dc-9ec8-2aa9bd63b604/channels?session_id=277CA36E71FA431C922EE9F8AEFF6261 (127.0.0.1) 15.54ms referer=None
此错误意味着什么,我该如何解决?
我使用的是Ubuntu 16.10,Python 3.5.2和Jupyter 4.2.1。