简体   繁体   English

在远程服务器上使用ein(emacs ipython notebook)

[英]Use ein (emacs ipython notebook) on remote server

I have installed and configured ein (emacs ipython notebook) to work on my local linux/mac machines. 我已经安装并配置了ein (emacs ipython notebook)来在我的本地linux / mac机器上工作。 However, I would like to use ein to open ipython notebooks on a remote server and run them from within ein. 但是,我想使用ein在远程服务器上打开ipython笔记本并在ein中运行它们。 Is this possible and if so could someone tell me how can this be done? 这是否可能,如果是这样,有人可以告诉我如何做到这一点?

M-x ein:notebooklist-open <enter>

ein prompts back with ein提示回来

URL or port number (default 8888):

At this point enter the full HTTP-URL of where ipython-server is running eg 此时输入运行ipython-server的完整HTTP-URL,例如

http://192.168.1.7:8888

(On the ipython server side -- by default it runs only on localhost:8888 . You should have started it with something like: (在ipython服务器端 - 默认情况下它只在localhost:8888上运行。你应该用以下内容启动它:

ipython notebook --ip="*"

). )。 For eg See this . 例如,见这个

I had the same issue with ein disconnecting immediately. 我有同样的问题,ein立即断开连接。

I solved it by creating a SSH tunnel from port 8888 on my local machine to port 8888 on the remote machine. 我通过从本地计算机上的端口8888到远程计算机上的端口8888创建SSH隧道来解决它。 Then, when ein asks where to connect just accept the default localhost:8888. 然后,当ein询问连接的位置时,只接受默认的localhost:8888。

I then needed to, as I recall, tell the notebook server to bind on all IP addresses (not just localhost). 我记得,然后我需要告诉笔记本服务器绑定所有IP地址 (而不仅仅是localhost)。 There are some potential security concerns with that, so make sure that you've got authentication and/or a proper firewall set up. 这有一些潜在的安全问题,因此请确保您已经设置了身份验证和/或适当的防火墙。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM