jupyter notebook 使用技巧
1、jupyter_contrib_nbextensions 计时插件
实现每个cell 运算时间显示
# cmd 输入如下指令👇:
pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
jupyter nbextension enable execute_time/ExecuteTime
安装时需关闭 jupyter
2、Jupyter Notebook修改起始路径方法
打开 cmd ,进入你安装的anaconda目录下,输入命令 jupyter notebook --generate-config,将生成jupyter_notebook_config.py文件
在[y/N]后面输入y (yes or no 的意思)
(1)打开Anaconda所在文件的目录,在电脑上找到对应箭头上的地址(图中,我的位置是C:\Users\lenvo.jupyter)找到.jupyter文件*
(2)进入.jupyter文件后,再打配置文件: jupyter notebook _config.py*
(3)打开配置文件后,找到这个地方,删除c.NotebookApp.notebook_dir 前面的 “#” 符号(#表示注释的意思),然后修改为自己设置的路径即可。*
3、jupyter遇到matplotlib的显示问题,可以添加下面两行代码。
from pylab import mpl
mpl.rcParams['font.sans-serif'] = ['SimHei'] #中文显示问题