centos 部署 jupyter notebook 是一件很简单的事情。
既然是一件很简单的事情,又为什么要发一个专题呢?
因为网络上充斥着大量舍近求远的方法。
1.安装(终端输入):
$ sudo dnf install gcc gcc-c++ python3 vim
$ pip3 install --user -i https://pypi.tuna.tsinghua.edu.cn/simple ipython jupyter notebook
2. jupyter notebook 生成配置文件(终端输入):
在用户目录运行以下命令,生成默认设置
$ jupyter notebook --generate-config
运行后会生成文件 .jupyter/jupyter_notebook_config.py
3. 生成 jupyter notebook 登录密码文本(如果不配置登录密码,将难以登录和使用)
(终端输入):
$ python3
>>> from notebook.auth import passwd
>>> passwd()
Enter password:
Verify password:
'sha1:df4a1......'
>>> exit()