在Ubuntu 12.04 VirtualBox Guest上安装IPython并从Windows主机上的浏览器中使用它 [英] Install IPython on Ubuntu 12.04 VirtualBox Guest and use it from the browser on the Windows Host

查看:53
本文介绍了在Ubuntu 12.04 VirtualBox Guest上安装IPython并从Windows主机上的浏览器中使用它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在来宾计算机(Ubuntu 12.04)上,我照常从存储库中安装了ipython和ipython-notebook.然后,我运行ipython笔记本启动服务器,并尝试从主机的浏览器(运行Windows 7)访问该页面,但无法连接.

On the guest machine (Ubuntu 12.04), I have installed ipython and ipython-notebook from the repositories as usual. Then I run the ipython notebook to start the server and try to access the page from the browser of the host (running Windows 7), but it won't connect.

ipython服务器在默认端口8888上运行.我尝试为VM使用NAT配置,并将端口8888从主机路由到来宾的8888,但是没有成功.我也尝试过使用桥接网络,但是我不确定应该在浏览器中输入哪个方向.使用端口8888上的ifconfig命令显示的eth0的主机IP吗?

The ipython server is running on the default port 8888. I have tried using the NAT configuration for the VM and route ports 8888 from host to 8888 on guest, but without success. I have tried using bridged networking as well, but I'm not sure which direction I should enter in the browser. Is it the host ip for eth0 shown with the ifconfig command, on port 8888?

是否可以使此配置正常工作?

Is it possible to get this configuration to work?

推荐答案

默认情况下,IPython Notebook在本地主机上运行.我认为VM的环回接口对主机OS不可见.您将必须指示笔记本使用

来监听VM的公共" IP.

The IPython Notebook runs on localhost by default. I don't think the loopback interface of the VM is visible to the Host OS. You will have to instruct the notebook to listen on the VM's 'public' IP with

ipython notebook --ip=a.b.c.d

那么您应该能够从主机进行连接.

then you should be able to connect from your host.

您还可以在ipython_notebook_config.py中将此值永久设置为NotebookApp.ip = 'a.b.c.d'.

You can also set this value permanently as NotebookApp.ip = 'a.b.c.d' in ipython_notebook_config.py.

这篇关于在Ubuntu 12.04 VirtualBox Guest上安装IPython并从Windows主机上的浏览器中使用它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆