安装jupyternotebook
首先必须要安装python3
确保pip是最新版本:
pip3 install --upgrade pip
在终端输入命令:
pip install jupyter notebook
安装完成后,测试是否安装成功:
jupyter notebook
修改默认的存储路径
此时可以发现默认启动目录在c盘,修改默认的存储路径:
-
获取配置文件夹所在路径:
jupyter notebook --generate-config
-
通过上述路径打开此文件,进行自定义:
取消注释,在单引号中填入自定义文件夹路径
注意文件路径中斜杠的方向!
- 再次运行 jupyter notebook 可发现变化:
代码自动补全拓展
-
安装nbextensions
pip install jupyter_contrib_nbextensions jupyter contrib nbextension install --user
-
安装 nbextensions_configurator
pip install jupyter_nbextensions_configurator jupyter nbextensions_configurator enable --user
-
点击nbnextensions
c=“代码拓展.png” alt=“image-20220712163310829” style=“zoom:80%;” />
另外,jupyter notebook 可安装主题!
jupyternotebook打开指定文件夹
在指定文件夹下cmd,打开命令窗口,然后在cmd命令窗口中输入即可打开指定的文件夹
jupyter notebook ./