juypter

1、安装anaconda https://www.anaconda.com/download/#linux 建议在内核3.10上的机器上进行安装

2、配置jupyter

2.1、初始化配置文件 jupyter notebook --generate-config --allow-root Writing default config to: /root/.jupyter/jupyter_notebook_config.py

2.2、生成密码 [root@jupyter ~]# ipython
Python 2.7.5 (default, Nov 6 2016, 00:28:07)
Type "copyright", "credits" or "license" for more information.

IPython 5.3.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.

In [1]: from notebook.auth import passwd

In [2]: passwd()
Enter password:
Verify password:
Out[2]: 'sha1:da874cad4309:4104089e5ef97c8fcbe69c2ac7d6a1071ca50a40'

2.3、配置修改,根据关键词修改即可 62 #c.NotebookApp.allow_root = False
去掉62行的注释,并修改成True即可解决root权限运行的问题。
163 #c.NotebookApp.ip = 'localhost'
去掉注释,并把localhost改成0.0.0.0,这样就可以外部访问了,默认只有在本机可以访问的;
163 c.NotebookApp.ip = '0.0.0.0'

203 #c.NotebookApp.notebook_dir = u''
改成如下,这样就会默认把notebook上创建的文件保存到指定目录下;需要事先创建。
203 c.NotebookApp.notebook_dir = u'/opt/jupyter'

218 #c.NotebookApp.password = u''
加入上面创建的密码:
218 c.NotebookApp.password = u'sha1:da874cad4309:4104089e5ef97c8fcbe69c2ac7d6a1071ca50a40'

3、运行 https://jupyter.readthedocs.io/en/latest/running.html jupyter notebook notebook.ipynb jupyter notebook --port 9999 jupyter notebook --no-browser

转载于:https://my.oschina.net/hnuweiwei/blog/1805178

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值