配置-jupyter notebook快速配置

配置-jupyter notebook快速配置

安装必要的插件
pip3 install yapf
pip install autopep8 --user
pip3 install jedi==0.17.2

生成密码
from notebook.auth import passwd
passwd()
xxx12345+
'argon2:$argon2id$v=19$m=10240,t=10,p=8$U4zUU7WDdXK1GAiqZHiBKw$/uIJNKuzQbJx6kxZLJD53A'

生成配置文件
jupyter notebook --generate-config
c.NotebookApp.password

配置目录和密码
vim ~/.jupyter/jupyter_notebook_config.py

126 c.NotebookApp.notebook_dir
c.NotebookApp.browser

c.NotebookApp.allow_root =True
c.NotebookApp.ip = ‘*’
c.NotebookApp.open_browser = False
c.NotebookApp.password = ''
c.NotebookApp.port = 8888


安装扩展
pip3 install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
pip3 install --user jupyter_nbextensions_configurator
jupyter nbextensions_configurator enable --user

# 自动化脚本
#!/bin/bash

# Install Jupyter
pip3 install jupyter

# Generate Jupyter config file
jupyter notebook --generate-config

# Set Jupyter config options
echo "c.NotebookApp.allow_root = True" >> ~/.jupyter/jupyter_notebook_config.py
echo "c.NotebookApp.ip = '0.0.0.0'" >> ~/.jupyter/jupyter_notebook_config.py
echo "c.NotebookApp.open_browser = False" >> ~/.jupyter/jupyter_notebook_config.py
echo "c.NotebookApp.password = 'sha1:$(echo -n '123456' | sha1sum | awk '{print $1}')'" >> ~/.jupyter/jupyter_notebook_config.py
echo "c.NotebookApp.password = 'sha1:2b2ff3b3fc1c:0e675f766b7d22d0a84dc9a9f0b89b14cfdcb5d5'" >> ~/.jupyter/jupyter_notebook_config.py
echo "c.NotebookApp.port = 8888" >> ~/.jupyter/jupyter_notebook_config.py

# Start Jupyter

# Install Jupyter extensions
pip3 install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
pip3 install --user jupyter_nbextensions_configurator
jupyter nbextensions_configurator enable --user

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值