1、jupyter notebook 安装
1.1 通过pip安装所需套件
- pip3 install requests
- pip3 install BeautifulSoup4
- pip3 install jupyter
- pip3 install pandoc #可以将笔记导出为pdf格式
- pip3 install jupyter-cjk-xelatex #pandoc所需套件
1.2 打开运行环境 jupyter notebook
jupyter notebook
1.3 配置jupyter 默认笔记本保存路径
jupyter notebook --generate-config
找到配置文件jupyter_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 = ‘C:\Analysis’
其中 C:\Analysis 为我的工作目录,你可以改成你自己的。#c.NotebookApp.notebook_dir = ''中的#必须删除,且前面不能留空格。
C:\Analysis 文件夹必须提前新建,如果没有新建,Jupyter Notebook会找不到这个文件,会产生闪退现象。