title: notebook date: 2021-09-06 17:25:26 categories:
- IT技术
- 编程语言
- python tags:
- IT技术
- 编程语言
- python
摘要:
notebook
安装 notebook pip3 install jupyter notebook
conda中安装 “conda install nb_conda”
创建配置文件 jupyter notebook --generate-config
linux /root/.jupyter/jupyter_notebook_config.py
# 根目录
c.NotebookApp.notebook_dir = ''
#允许root允许
c.NotebookApp.allow_root = True
#监听地址
c.NotebookApp.ip = '0.0.0.0'
#监听端口
c.NotebookApp.port = 9011
设置密码
jupyter notebook password
加载指定配置文件
生成密码后,文件存放在/root/.jupyter/目录下。把整个目录下的文件拷贝到需要保存的目录,结构如下
jupyter_notebook_config.json
jupyter_notebook_config.py
migrated
以指定配置启动 jupyter-notebook --allow-root --config=/data/soft/notebook/.conf/jupyter_notebook_config.py
加载 .py文件即可,.py文件会寻找同目录下的.json文件
conda 中不识别 其他环境
conda install ipykernel
python -m ipykernel install --name [环境名称]
添加后会在/usr/local/share/jupyter/kernels/ 下有对应显示,不正确的添加过去直接删除即可
pip install jupyterlab-language-pack-zh-CN
wsl2 安装docker
不要在wsl2中直接安装,需要安装win版本的,官方教程
https://learn.microsoft.com/zh-cn/windows/wsl/tutorials/wsl-containers