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


当前回答

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

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并运行您的命令。

你可以直接在打开的笔记本上完成:

!pip install jupyterthemes
!jt -t chesterish

重新启动主题应用程序的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粘贴

遵循以下步骤

使用pip安装jupyterthemes:

pip install jupyterthemes

然后从下面选择主题,并使用以下命令设置它们。一旦成功安装,我们中的许多人认为我们需要再次启动jupyter服务器,只需刷新页面。

使用以下命令设置主题:

jt -t <theme-name>

可用的主题:

onedork grade3 oceans16 chesterish monokai solarizedl solarizedd

可用主题的截图在其Github存储库中。

在设置主题时,还可以在同一个命令中指定-T(——toolbar)来保留工具栏,否则工具栏将不显示。如需帮助,请输入jt -h。