一. 安装 jupyter
-
打开cmd,在cmd中键入以下命令:
pip install --upgrade pip # 升级pip pip install jupyter # 安装jupyter
二. 更改启动目录
-
查看配置文件:
C:\Users\Nick>jupyter notebook --generate-config Writing default config to: C:\Users\Nick\.jupyter\jupyter_notebook_config.py
-
按照上面提示的路径,打开upyter_notebook_config.py文件,修改以下内容:
修改前:## The directory to use for notebooks and kernels. # c.NotebookApp.notebook_dir = ''
修改后:
## The directory to use for notebooks and kernels. c.NotebookApp.notebook_dir = 'E:\data_analysis'
三. 启动 jupyter
-
打开cmd,在终端输入以下命令,即可启动jupyter
-
看看启动目录是不是已经是我们指定的目录了
jupyter notebook