赞
踩
步骤 1: 终端输入如下命令生成jupyter_notebook_config.py
文件:
jupyter notebook --generate-config # 地址:C:\Users\XXX\.jupyter\jupyter_notebook_config.py
步骤 2: 用记事本/其他编辑器打开上述文件,在如下代码中填入目标工作目录:
c.NotebookApp.notebook_dir = 'E:\\jupyter_work'
步骤 3: 去掉该行代码前的#
号,保存文件后重启jupyter notebook
即可。
步骤 1: 确保 python3 中已安装 ipykernel, 如未安装可使用如下命令安装:
pip install ipykernel
步骤 2: 将指定环境集成至 Jupyter Notebook 中:
python -m ipykernel install --name kernelname
步骤 3: 查看 Jupyter Notebook 中已集成的 python 环境:
jupyter kernel list
步骤 4: 删除 Jupyter Notebook 中已集成的 python 环境:
jupyter kernelspec remove kernelname
修改快捷方式,删除目标(T)
项值最后的%USERPROFILE%
。该参数会覆盖掉 notebook_dir 设置,导致配置不起效,因此需要删除。修改前后如下图:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。