Pat*_*bin 3 python windows zeromq pyzmq jupyter-notebook
我从 powershell 提示符启动 Jupyter jupyter notebook,它会正确加载,但是当我打开新的或现有的笔记本时,内核会忙碌大约 10 秒,然后弹出一个窗口,提示 Python 已停止工作。在我的终端中,我得到了Invalid argument (C:\ci\zeromq_1602704446950\work\src\epoll.cpp:100)(见下文)。您有什么解决方案吗?我尝试过使用不同的环境并卸载/重新安装pyzmq。
[I 12:58:16.682 NotebookApp] Serving notebooks from local directory: C:\Users\tobinp
[I 12:58:16.682 NotebookApp] Jupyter Notebook 6.1.6 is running at:
[I 12:58:16.684 NotebookApp] http://localhost:8888/?token=9eee2cc4e598b193ad42fc05ff620a43d0e5f29e885170b3
[I 12:58:16.684 NotebookApp] or http://127.0.0.1:8888/?token=9eee2cc4e598b193ad42fc05ff620a43d0e5f29e885170b3
[I 12:58:16.685 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 12:58:18.289 NotebookApp]
To access the notebook, open this file in a browser: file:///C:/Users/tobinp/AppData/Roaming/jupyter/runtime/nbserver-18144-open.html Or copy and paste one of these URLs: http://localhost:8888/?token=7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx6 or http://127.0.0.1:8888/?token=7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx6
Invalid argument (C:\ci\zeromq_1602704446950\work\src\epoll.cpp:100)
Run Code Online (Sandbox Code Playgroud)
这是我第三次看到此类问题,而且都发生在 2021 年 1 月,这似乎对我们所有人来说都是一个重大问题。我安装了Windows 10和python环境20多次,其中Windows 10 1909、20H2、python 3.6.8 3.7.9 3.8.6 3.8.7,问题仍然存在。这个问题困惑了我两个多星期,原本以为是tensorflow问题、CUDA 11.0问题、cuDNN问题、vc++库问题甚至是RTX 30系列GPU问题。
解决方案:
这个错误与你的pyzmq库有关。最近,当我为我的新电脑设置一个全新的Python环境时,这也给我带来了麻烦。我只是通过使用安装jupyterlab(或jupyter笔记本)pip install jupyterlab然后就会出现问题。然后,我检查了包的依赖关系,安装了pyzmq,因为我安装了jupyterlab(或者jupyter笔记本),jupyterlab需要ipykernel,ipykernel需要pyzmq,并且安装了更高版本的pyzmq。
我所做的对我有用的是pip uninstall pyzmq,然后
降级到较低版本pip install pyzmq==19.0.2
解决了python内核崩溃的问题。
避免此问题的另一种方法是将所有环境安装在 Ubuntu 18.04 上,这对我有用,它暂时帮助我避免了此问题。使用Anaconda可能可以避免这个问题,但是我在Anaconda中使用tensorflow遇到了问题,所以最终没有使用Anaconda。
那么,我的建议是,如果环境已经为你解决了,请备份你的系统,当问题再次出现时恢复系统。
我还发布了一个 github 问题链接:https://github.com/zeromq/pyzmq/issues/1505,如果您有类似问题,可以将其发布到那里。
| 归档时间: |
|
| 查看次数: |
8659 次 |
| 最近记录: |