linux环境下配置和启动jupyter notebook 您所在的位置:网站首页 linux重新启动系统命令在哪 linux环境下配置和启动jupyter notebook

linux环境下配置和启动jupyter notebook

2024-07-13 05:19| 来源: 网络整理| 查看: 265

1 执行命令查看jupyter的配置文件在哪

jupyter notebook --generate-config

控制台打印如下:

Writing default config to: /*/*/.jupyter/jupyter_notebook_config.py

2 打开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 实验室设备网 版权所有