回到首页

linux配置jupyter

pip install jupyter安装jupyter

python -c "import IPython; print(IPython.lib.passwd())"获取一个密码的密文,密文以'sha1'开头,设为cipher。使用apt install ipython或yum install ipython安装IPython

jupyter notebook --generate-config --allow-root生成jupyter配置文件,编辑~/.jupyter/jupyter_notebook_config.py,删掉以下配置项的注释,更改默认值:

# 允许所有IP访问
c.NotebookApp.ip = '*'
# 允许以root角色执行操作
c.NotebookApp.allow_root = True
# 启动时不自动打开浏览器
c.NotebookApp.open_browser = False
# 指定端口号
c.NotebookApp.port = 9001
# 设置访问密码
c.NotebookApp.password = cipher
# 工作目录
c.ContentsManager.root_dir = '/home/user'

jupyter notebook开始食用

参考链接:CentOS下部署Jupyter

本文创建于2021年12月31日18点46分,修改于2023.3.9/23.2

#linux #jupyter