Windows10下Jupyter Notebook启动后无法连接内核求助
Jupyter Notebook连接失败(ZeroMQ相关错误)问题求助
今日发现Anaconda Navigator意外退出,此前Jupyter Notebook可正常使用,但重新启动时出现错误提示:
无法建立与Notebook服务器的连接。Notebook将继续尝试重新连接。请检查您的网络连接或Notebook服务器配置。
通过命令行启动时的日志如下:
[I 10:13:33.456 NotebookApp] Serving notebooks from local directory: C:\Users\arena [I 10:13:33.456 NotebookApp] Jupyter Notebook 6.5.4 is running at: [I 10:13:33.456 NotebookApp] http://localhost:8888/?token=c5a68051d3d81fc964448454cd0310f81f5b4366ed6bd5ad [I 10:13:33.456 NotebookApp] or http://127.0.0.1:8888/?token=c5a68051d3d81fc964448454cd0310f81f5b4366ed6bd5ad [I 10:13:33.456 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 10:13:33.476 NotebookApp] To access the notebook, open this file in a browser: file:///C:/Users/arena/AppData/Roaming/jupyter/runtime/nbserver-7316-open.html Or copy and paste one of these URLs: http://localhost:8888/?token=c5a68051d3d81fc964448454cd0310f81f5b4366ed6bd5ad or http://127.0.0.1:8888/?token=c5a68051d3d81fc964448454cd0310f81f5b4366ed6bd5ad 0.00s - Debugger warning: It seems that frozen modules are being used, which may 0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off 0.00s - to python to disable frozen modules. 0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation. [I 10:13:37.684 NotebookApp] Creating new notebook in Bad address (C:\ci\zeromq_1616055400030\work\src\epoll.cpp:100) [W 10:13:39.111 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20231030101332 (::1) 20.260000ms referer=http://localhost:8888/notebooks/Untitled11.ipynb?kernel_name=my_env [I 10:13:39.117 NotebookApp] Kernel started: 38983398-bb22-4527-a438-6703c9caef6e, name: my_env 0.00s - Debugger warning: It seems that frozen modules are being used, which may 0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off 0.00s - to python to disable frozen modules. 0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation. Bad address (C:\ci\zeromq_1616055400030\work\src\epoll.cpp:100) Bad address (C:\ci\zeromq_1616055400030\work\src\epoll.cpp:100) [IPKernelApp] WARNING | Parent appears to have exited, shutting down.
已尝试以下方案,均无效(操作系统为Windows10):
- 降级tornado版本
- 创建新的conda环境
- 卸载重装Jupyter Notebook
- 重装最新版Anaconda和Python
更新
执行jupyter kernelspec uninstall my_env删除自定义环境后,命令行启动Jupyter Notebook的错误日志如下:
[W 11:42:24.708 NotebookApp] Loading JupyterLab as a classic notebook (v6) extension. [I 2023-10-30 11:42:24.718 LabApp] JupyterLab extension loaded from C:\Users\arena\anaconda3\Lib\site-packages\jupyterlab [I 2023-10-30 11:42:24.719 LabApp] JupyterLab application directory is C:\Users\arena\anaconda3\share\jupyter\lab [I 11:42:26.388 NotebookApp] Serving notebooks from local directory: C:\Users\arena [I 11:42:26.389 NotebookApp] Jupyter Notebook 6.5.4 is running at: [I 11:42:26.389 NotebookApp] http://localhost:8888/?token=cbd196e87cc8774ac3658cb2246c322911b8e11c895f9f10 [I 11:42:26.389 NotebookApp] or http://127.0.0.1:8888/?token=cbd196e87cc8774ac3658cb2246c322911b8e11c895f9f10 [I 11:42:26.389 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 11:42:26.418 NotebookApp] To access the notebook, open this file in a browser: file:///C:/Users/arena/AppData/Roaming/jupyter/runtime/nbserver-1836-open.html Or copy and paste one of these URLs: http://localhost:8888/?token=cbd196e87cc8774ac3658cb2246c322911b8e11c895f9f10 or http://127.0.0.1:8888/?token=cbd196e87cc8774ac3658cb2246c322911b8e11c895f9f10 0.00s - Debugger warning: It seems that frozen modules are being used, which may 0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off 0.00s - to python to disable frozen modules. 0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation. [I 11:42:32.590 NotebookApp] Creating new notebook in Bad address (C:\ci\zeromq_1616055400030\work\src\epoll.cpp:100) [I 11:42:34.876 NotebookApp] Kernel started: 5894b3d1-7185-4445-b150-14740c19d257, name: python3 0.00s - Debugger warning: It seems that frozen modules are being used, which may 0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off 0.00s - to python to disable frozen modules. 0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation. Bad address (C:\ci\zeromq_1616055400030\work\src\epoll.cpp:100) Exception in thread IOPub: Bad address (C:\ci\zeromq_1616055400030\work\src\epoll.cpp:100) Traceback (most recent call last): File "C:\Users\arena\anaconda3\Lib\threading.py", line 1038, in _bootstrap_inner self.run() File "C:\Users\arena\anaconda3\Lib\threading.py", line 975, in run self._target(*self._args, **self._kwargs) File "C:\Users\arena\anaconda3\Lib\site-packages\ipykernel\iostream.py", line 85, in _thread_main self.io_loop.run_sync(_start_event_gc) File "C:\Users\arena\anaconda3\Lib\site-packages\tornado\ioloop.py", line 521, in run_sync self.start() File "C:\Users\arena\anaconda3\Lib\site-packages\tornado\platform\asyncio.py", line 195, in start self.asyncio_loop.run_forever() File "C:\Users\arena\anaconda3\Lib\asyncio\base_events.py", line 607, in run_forever self._run_once() File "C:\Users\arena\anaconda3\Lib\asyncio\base_events.py", line 1884, in _run_once event_list = self._selector.select(timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\arena\anaconda3\Lib\selectors.py", line 323, in select r, w, _ = self._select(self._readers, self._writers, [], timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\arena\anaconda3\Lib\selectors.py", line 314, in _select r, w, x = select.select(r, w, w, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ OSError: [WinError 10038] An operation was attempted on something that is not a socket [IPKernelApp] WARNING | Parent appears to have exited, shutting down.
希望能提供可行的解决方案,感谢支持!
内容的提问来源于stack exchange,提问作者SmoltingAmber
相关产品推荐
相关产品推荐

