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


当前回答

conda install jupyterthemes

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

但是,

pip install jupyterthemes

在Anaconda Prompt工作过。

其他回答

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

在我改变主题后,它表现得很奇怪。字体很小,看不到工具栏,我真的不喜欢这个新外观。

对于想要还原原有主题的用户,可以按照以下步骤进行操作:

jt -r

您需要在第一次这样做时重新启动Jupyter,之后刷新就足以启用新主题。

或者直接从笔记本里

!jt -r

您可以使用运行笔记本中的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 install jupyterthemes或PIP install——upgrade jupyterthemes以升级到最新版本的主题。 然后列出所有的主题:jt -l 在jt-t <themename>之后,例如jt-t solarizedl

如果有人有兴趣在启用主题的docker中运行anaconda

docker run -t --rm -p 8888:8888 -v $(pwd):/opt/notebooks continuumio/anaconda3 /bin/bash -c "pip install jupyterthemes; jt -t onedork; /opt/conda/bin/jupyter notebook --ip=0.0.0.0 --port=8888 --notebook-dir=/opt/notebooks --allow-root --no-browser;"