Jupyter notebook using the default theme for a long time prone to visual fatigue, and greater harm to the eyes white background, it is still necessary to modify the theme
Tools / materials
-
Installation jupyter notebook, if not, please download, Download References
-
Theme pack jupyter themes, see reference Download
Method / Step
-
After the download good theme package, enter pip install --upgrade jupyterthemes at the command prompt, install the theme package
-
After installing, enter jt -l at the command prompt, you can view the theme:
Available Themes:
chesterish
grade3
monokai
oceans16
onedork
solarizedd
solarizedl
It would continue to execute the command: jt -t theme name (theme name can be selected chesterish ....)
So that you can modify the theme, which is open jupyter notebook you can see the theme of the revised
-
After entering jt -l course also possible error, the last line in the command prompt is displayed:
UnicodeDecodeError: 'gbk' codec can't decode byte 0x8b in position 41271: illegal multibyte sequence。。。
This procedure may be modified by the methods described below to correct:
-
The first step, modify stylefx.py
File Location: D: \ Anaconda3 \ Lib \ site-packages \ jupyterthemes (a different computer, the path is not the same, particularly to see the position of the mounting anaconda)
Open stylefx.py, modify the code used jupyter notebook
-
The second step, modify lexer.py file
File address: D: \ Anaconda3 \ Lib \ site-packages \ lesscpy \ lessc (a different computer, the path is not the same, particularly to see the position of the mounting anaconda)
Use jupyter notebook open file lexer.py
-
Finally, you can enter at the command prompt: JT -t theme name to modify the theme of the jupyter notebook, for example, enter jt -t chesterish, after jupyter notebook open, you can see the appropriate topic, see below