无法建立IPython笔记本WebSocket连接。您将无法运行代码

时间:2014-08-03 14:07:56

标签: python websocket ipython ipython-notebook

我一直在尝试在IPython笔记本中运行一些简单的代码,但我不断收到此错误: "无法建立WebSocket连接。您将无法运行代码。检查您的网络连接或笔记本服务器配置。"

安装过程中没有问题,加载笔记本时没有错误消息。

我想也许这与在xamp上运行本地服务器的事实有关?

Doed有谁知道如何解决这个问题?

我会非常感激。

编辑:我正在使用命令' ipython notebook'加载我的笔记本。在命令提示符输出是:

[NotebookApp]"Using existing profile dir: c:\users\Nimrod\.ipython\profile_default
[NotebookApp]using MathJax from CDN: http://cdn.mathjax.org/mathjax/latest/mathjax.js
[NotebookApp] Serving notebooks from local directory c:\users\Nimrod
[NotebookApp] 0 active kernels
[NotebookApp] use control c to stop server and shut doen all kernels
[NotebookApp] Kernel started: 0ac0db12-63a0-4a4a-be25-0051

非常感谢。

1 个答案:

答案 0 :(得分:0)

好的,默认情况下ipython notebook使用在本地端口8888上运行的tornado http服务器独立启动。

尝试在浏览器中输入localhost:8888

如果要将其自定义为在不同的端口上运行,请使用:

ipython notebook --port=<NEW PORT>

如果您还想允许来自远程计算机的连接,请执行以下操作:

ipython notebook --ip=0.0.0.0 --port=<NEW PORT>