我已成功启动我的笔记本并在服务器上运行,如下所示:
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/