在局域网上公开python jupyter

blu*_*sky 27 python linux python-3.x ubuntu-14.04 jupyter

我在本地网络局域网上安装了jupyter但我无法http://<IP>:8888从局域网上的另一台macine 访问.我用iptables打开了端口8888和端口范围49152到65535(此范围在http://jupyter-notebook.readthedocs.io/en/latest/public_server.html中指定)

本指南http://jupyter-notebook.readthedocs.io/en/latest/public_server.html描述了公开公开笔记本,但我只想尝试通过LAN共享.

我错过了一步吗?

per*_*5th 58

尝试jupyter notebook --ip <your_LAN_ip> --port 8888 然后http://your_LAN_ip:8888从另一台计算机访问


未来陆*_*投资人 13

在 macOS 中,以下对我有用

0. 使用生成配置文件

jupyter notebook --generate-config

1.在配置文件中设置并添加

c.NotebookApp.ip = '0.0.0.0' # listen on all IPs
c.NotebookApp.token = ''     # disable authentication
c.NotebookApp.allow_origin = '*' # allow access from anywhere
c.NotebookApp.disable_check_xsrf = True # allow cross-site requests
Run Code Online (Sandbox Code Playgroud)

2. 运行:

jupyter notebook --ip <your_LAN_ip> --port 8888
Run Code Online (Sandbox Code Playgroud)

  • 也可以使用以下命令将端口号添加到配置中:`c.NotebookApp.port = 8888` (2认同)

chj*_*und 5

也可以在c.NotebookApp.ip = '<your_ip_or_hostname>'c.NotebookApp.port = 8888参数的配置文件中添加IP /主机。

如果您还没有jupyter配置文件,请运行 jupyter notebook --generate-config