时间:2021.09.22
环境:Linux
目的:CentOS安装jupyter
说明:
作者:Zhong QQ交流群:121160124 欢迎加入!
一、本地安装与启动
本地已安装python3和配置pip3
pip3 install jupyterlab
启动JupyterLab
jupyter-lab
二、本地安装远程web访问
本地已安装ipython 进入ipython
ipython
设置密码
from notebook.auth import passwd
passwd()
jupyter生成配置文件
jupyter lab --generate-config
修改配置文件(文件默认位于家目录的.jupyter目录)
vim /root/.jupyter/jupyter_lab_config.py
修改如下的选项
c.ServerApp.password = '上面ipython生成的哈希码'
c.ServerApp.port = 8888 // 端口号
c.ServerApp.password_required = True // 开启登录密码验证
c.ServerApp.ip = '0.0.0.0' // ip地址
c.ServerApp.allow_root = True
c.ServerApp.notebook_dir = '/opt/jupyter' // jupyter工作目录
启动服务
jupyter lab
启动后可以在连通的网络里的主机web浏览器登录进行相关的操作
关注微信公众号 加入qq聊天群121160124