安装#Jupyter Notebook 用久了就离不开了,然而自带的主题真的不忍直视。为了视力着想,为了自己看起来舒服,于是折腾了一番。。在 github 上发现了一个 jupyter-themes 工具,可以通过 pip 安装,非常方便使用。 首先是主题下载,为了速度快点,使用豆瓣源,命令行如下所示: pip install -i http://pypi.douban.com/simple --trusted-host pypi.douban.com --no-dependencies jupyterthemes==0.18.2
安装好了,有的电脑可能会提示缺少 lesscpy,继续 pip 安装 pip install -i http://pypi.douban.com/simple --trusted-host pypi.douban.com lesscpy 然后是对主题选择、字体大小进行设置,我总结了一个我最喜欢的 jt --lineh 140 -f consolamono -tf ptmono -t grade3 -ofs 14 -nfs 14 -tfs 14 -fs 14 -T -N 命令行的格式的解释如下表所示:
附上最终效果: 接着实现自动代码补全,首先安装 nbextensions pip install -i http://pypi.douban.com/simple --trusted-host pypi.douban.com jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
然后安装 nbextensions_configurator pip install -i http://pypi.douban.com/simple --trusted-host pypi.douban.com jupyter_nbextensions_configurator
jupyter nbextensions_configurator enable --user
如果提示缺少依赖,就安装对应依赖即可。 最后重启 jupyter,在弹出的主页面里,能看到增加了一个
这时打开一个笔记,来感受一下吧。 更新#有几个给我留言说 其实大多都是缺少依赖,我在今天(2020/04/08)重新安装,按照上面的步骤,也没有
|
|