linux环境下配置和启动jupyter notebook | 您所在的位置:网站首页 › linux重新启动系统命令在哪 › linux环境下配置和启动jupyter notebook |
1 执行命令查看jupyter的配置文件在哪 jupyter notebook --generate-config控制台打印如下: Writing default config to: /*/*/.jupyter/jupyter_notebook_config.py2 打开ipython,生成密码 [root@djt_37_152 wj]# ipython In [1]: from notebook.auth import passwd In [2]: passwd() Enter password: 123456Verify password: 123456 Out[2]: 'sha1:f8b5f5dbeca8:d1f5b93d5e787e4bf1bf4ad2c48c177ba79f55dd' #这个秘钥要copy备用3 编辑配置文件jupyter_notebook_config.py [root@djt_37_152 wj]# vim /root/.jupyter/jupyter_notebook_config.py #改几个地方: c.NotebookApp.ip = 'xx.xxx.xx.xxx' 即对外提供访问的ip c.NotebookApp.port = 9527 即对外提供访问的端口 c.NotebookApp.open_browser = False False即启动不打开浏览器 c.NotebookApp.password = u'sha1:f8b5f5dbeca8:d1f5b93d5e787e4bf1bf4ad2c48c177ba79f55dd' 这个就是上面生成的秘钥 c.NotebookApp.notebook_dir = u'/search/autotest/jupyter_dir' 即设置jupyter启动后默认的根目录4 启动jupyter jupyter notebook启动成功,完成 5 后台挂载启动notebook,不需要单独开窗口启动,启动后再后台运行 nohup jupyter notebook &默认日志打印在当前目录的nohup.out文件中 |
CopyRight 2018-2019 实验室设备网 版权所有 |