python - 远程访问ipython笔记本服务器抛出异常

标签 python jupyter-notebook

我已成功启动我的笔记本并在服务器上运行,如下所示:

ipython notebook --profile=nbserver
2014-07-18 11:14:05.473 [NotebookApp] Using existing profile dir: u'/home/local/AD/jack/.ipython/profile_nbserver'
2014-07-18 11:14:05.482 [NotebookApp] Using MathJax from CDN: https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js
2014-07-18 11:14:05.497 [NotebookApp] Serving notebooks from local directory: /home/local/AD/jack/.ipython/profile_nbserver
2014-07-18 11:14:05.497 [NotebookApp] 0 active kernels 
2014-07-18 11:14:05.497 [NotebookApp] The IPython Notebook is running at: all ip addresses on your system]:9999
2014-07-18 11:14:05.498 [NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

当我尝试使用以下方式远程访问它时:

https://devs-sandbox02.jfk.ad.radio.com:9999

服务器进入循环重复消息:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/zmq/eventloop/ioloop.py", line 346, in start
    self._handlers[fd](fd, events)
KeyError: 6
ERROR:root:Exception in I/O handler for fd 6

这是什么原因造成的?我该如何解决这个问题?

最佳答案

我遇到了同样的问题,只是通过升级 pyzmq 修复了它:

$ pip search pyzmq
pyzmq                     - Python bindings for 0MQ
INSTALLED: 13.0.2
LATEST:    14.3.1

$ sudo pip install --upgrade pyzmq

(希望这对像我一样来到这里的其他人有帮助!)

关于python - 远程访问ipython笔记本服务器抛出异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24828602/

相关文章:

python - 查找 pyquery 对象的标签名称

python - 如何在 Flask 中设置 Inherited MethodView 对 sqlalchemy 模型进行 CRUD 操作

python - 带有圆形图像的 Qlabel

python - 如何循环访问 Jupyter/iPython Notebook 中的多个单元格

java - 我的类在 jar 中找不到 python 文件

jupyter-notebook - 为什么在 Jupyter Notebook Julia 中 boolean 值返回 0/1?

python - pyproj 不适用于 ipython(但适用于 CLI)

python - 如何在绘图中为一个 x 值绘制具有多个 y 值的折线图?

python - 如何在 Jupyter Lab 中编辑 .gitignore?

python - 为什么我要在 Python 中使用 int( input().strip() ) 而不是 int( input() )?