本地访问服务器jupyter notebook

本地访问服务器jupyter notebook

1 默认服务器上jupyter notebook安装完成(建议使用Anaconda,自带jupyter)
2 配置环境,通过远程方式访问jupyter notebook

$ jupyter notebook --generate-config --allow-root

3 生成登录密码

$ python 
Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 17:14:51) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from notebook.auth import passwd
>>> passwd()
Enter password: 
Verify password: 
'sha1:e014e86fa5e2:5f486fca6f143dc92cc7fd8f06d5714205be5523' 
>>> exit()

4 修改配置文件

vim ~/.jupyter/jupyter_notebook_config.py 
c.NotebookApp.ip='*'
c.NotebookApp.password = u'sha1:e014e86fa5e2:5f486fca6f143dc92cc7fd8f06d5714205be5523'
c.NotebookApp.open_browser = False
c.NotebookApp.port =8888

5 服务器打开jupyter notebook

jupyter notebook  --ip=0.0.0.0 --no-browser --allow-root

6 本地访问 http://服务器IP:8888

7 有可能之后输入密码时会有冲突:jupyter_notebook_config.json has higher priority
解决办法:
强行重置了jupyter notebook的密码 。
输入命令:jupyter notebook password
然后设置你的密码即可。

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值