Custom themes for Jupyter Notebook
Start your free 7-days trial now!
To install and apply custom themes (e.g. dark mode) for Jupyter notebook, use the jupyterthemes library maintained by Kyle Dunovan over at Githubopen_in_new.
We show the basic usage here, but please check out the official Github pageopen_in_new for more details.
Installing via conda
To install jupyterthemes via conda:
$ conda install -c conda-forge jupyterthemes
...Downloading and Extracting Packagesopenssl-1.1.1h | 1.9 MB | ##################################### | 100% lesscpy-0.13.0 | 35 KB | ##################################### | 100% jupyterthemes-0.20.0 | 6.1 MB | ##################################### | 100% Preparing transaction: doneVerifying transaction: doneExecuting transaction: done
Note the following:
-cstands for channel andconda-forgeis the argument passed to this flag.conda-forgeis basically where thejupyterthemeslibrary lives.
Once installed, you can directly set a new theme by typing the following in the command line (terminal):
$ jt -t oceans16
Note the following:
jtstands forjupyterthemes.-tstands for theme.oceans16is an example of the name of a theme to set.for the theme to be applied, you have to restart your instance of Jupyter, and possibly clear browser cache.
With this, you can now code deep into the night:
Changing the font and font size
To change the font and font size:
$ jt -t chesterish -f roboto -fs 10