ITeye博客

Jupyter Notebook安装与配置

daizj · 2021-02-25 10:02 · Python · 编程语言 · Markdown

  1. 安装ipython, jupyter pip install ipython pip install jupyter

2.创建配置文件 jupyter notebook --generate-config

会在当前用户进入目录生成.jupyter目录,并生成jupyter_notebook_config.py文件,如 /root/.jupyter/jupyter_notebook_config.py

3.生成密码

1)在终端输入ipython 进入ipython界面 2)输入下面两行命令 from notebook.auth import passwd passwd() 3)根据提示输入两次密码,然后复制界面输出的字符长串

In : from notebook.auth import passwd

In : passwd() Enter password: Verify password: Out: 'argon2:$argon2id$v=19$m=10240,t=10,p=8$1eEGdP3pQxhSiSnEOsPIOA$pseS7SD4ddZf//FR7N5eFB'

4.修改配置文件 vi /root/.jupyter/jupyter_notebook_config.py,定位到文件末尾添加下面几项配置

一般添加下面几项就行: c.NotebookApp.password ='argon2:$argon2id$v=19$m=10240,t=10,p=8$1eEGdP3pQxhSiSnEOsPIOA$pseS7SD4ddZf//FR7N5eFB' c.NotebookApp.ip='*' c.NotebookApp.open_browser = False c.NotebookApp.port =8080 allow_remote_access = True c.NotebookApp.notebook_dir = '/data/jupyter'

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。