参考这个实现,只要在notebook里运行这段代码就行了,能让所有的cell都能够显示黑色背景

一个更为完备的工具

参考这个方案

安装jupyter-themer

然后执行jupyter-themer命令

jupyter-themer -c monokai

 

只要重启ipython notebook 就可以了

想要换回原来的默认值,执行

jupyter-themer

不加任何参数就行了

值得注意的是要是想让这些修改生效,要把.ipython文件夹下的以前的文件给删除掉

.ipython文件夹是ipython的配置文件,详细介绍可以参考这里,他基本在用户文件夹下

如果不小心吧整个文件夹都删除了,可能无法打开ipython notebook,这个时候只要执行下面的命令就行了

ipython profile create [profilename]

 

另附如何为cell添加行号:

https://stackoverflow.com/questions/20197471/how-to-display-line-numbers-in-ipython-notebook-code-cell-by-default/20197878

 

相关文章:

  • 2021-07-12
  • 2021-12-03
  • 2021-05-28
  • 2021-05-30
  • 2021-10-01
  • 2021-05-29
  • 2022-12-23
  • 2021-08-06
猜你喜欢
  • 2022-12-23
  • 2022-01-14
  • 2021-07-25
  • 2021-09-04
  • 2022-01-20
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案