我喜欢黑暗题材。但是,Jupyter笔记本的默认主题是浅色,我找不到更改主题/背景色的选项。这是怎么做到的?


当前回答

您可以使用运行笔记本中的set_nb_theme更改主题

!pip install jupyterthemes

from jupyterthemes import get_themes
import jupyterthemes as jt
from jupyterthemes.stylefx import set_nb_theme

set_nb_theme('chesterish')

从https://www.kaggle.com/getting-started/97540粘贴

其他回答

conda install jupyterthemes

在Windows系统中不适合我。我用的是水蟒。

但是,

pip install jupyterthemes

在Anaconda Prompt工作过。

你可以按照这些步骤来做。

PIP install jupyterthemes或PIP install——upgrade jupyterthemes以升级到最新版本的主题。 然后列出所有的主题:jt -l 在jt-t <themename>之后,例如jt-t solarizedl

使用conda直接安装Jupyterthemes包,使用:

conda install -c conda-forge jupyterthemes

然后,正如其他人指出的那样,使用jt -t <theme-name>更改主题

如果在尝试使用PIP时出现错误,您可以使用CMD并运行您的命令。

另一个选择是如果你使用谷歌chrome,想要一个黑暗的主题,让你在jupyter/网页上工作几个小时更容易,同时也让你的代码中的配色方案可读,那就是在实验中使用“Web内容的自动暗模式”标志- chrome://flags -我通常会选择“启用选择性图像反转”选项。