How to reset jupyter notebook theme to default?
Solution 1
My previous suggestion of deleting the custom/
directory doesn't do the trick. jupyter
caches the custom.css
file in other directories that are tricky to clear all together. If it doesn't find a folder custom
with .css
file inside it it looks in other locations to pick up a .css
file.
Also, I'm not sure if every location is actually deleted when you uninstall jupyter
.
The easiest solution is to delete the old custom.css
and replace it with a new empty custom.css
file. jupyter
picks that up and goes back to its default look.
Solution 2
An easier way might be to do:
pip install jupyterthemes
Now you can choose from the following given themes and activate it like this
# list available themes
# onedork | grade3 | oceans16 | chesterish | monokai | solarizedl | solarizedd
jt -t <THEME_NAME>
In order to reset your theme to the default theme just use
jt -r
For all information and more, visit github.com/dunovank/jupyter-themes
Hope this helps!
Solution 3
I am hoping that you used pip install jupyterthemes
to get the custom themes.
The following are the steps that take you from installation of new themes to the resetting of the same to default.
pip install jupyterthemes
jt -l (List of all themes)
jt -t <THEME NAME> (to implement a theme)
jt -r (to reset the notebook to default)
Hope this helps.
Solution 4
In order to reset your theme type in cmd
jt -r
delete the directories returned by console. Now restart the notebook server.
Solution 5
Close any instances of jupyter notebook. Open Anaconda prompt. Run "pip install jupyterthemes" This should show you the themes installed/ cached by jupyter notebook.
Now run "jt -r" to reset the theme to default as shown below.
Open and test jupyter notebook. Theme should be gone now. Cheers!!!
Admin
Updated on July 09, 2022Comments
-
Admin almost 2 years
I'm using the jupyter notebook installed with Anaconda (I'm on Mac). Few days ago, I wanted to change the theme to have a dark background, and I followed the instructions here. Namely, I've downloaded the theme
custom.css
and placed it in~/.jupyter/custom/
. It worked very well.I liked the theme, but I would like to go back to the default one (this one does not show the main toolbar, among other things). I tried to remove the
custom.css
from its folder, I reset my terminal, but nothing changes! I'm guessing that jupyter keeps a copy of the themes somewhere that I should delete, but I can't find it.I have also tried uninstalling jupyter and reinstalling, following the commands:
conda update conda conda uninstall ipython conda install jupyter
Again, no change. I'm stuck with my black background theme with no toolbar.
-
TheTank over 5 yearsI get
command not found: jt
when i usejt -r
. How do I reset to default theme? -
Gonzalo Garcia over 4 years@TheTank you should install jupyterthemes before
-
P i over 4 years@TheTank also if you had a virtual environment activated when you pip-installed it, make sure you are in the same virtual environment when you UN-install it!
-
theProcrastinator over 2 yearsI couldn't
pip install jupyterthemes
, insteadconda install -c conda-forge jupyterthemes
works :) -
maciejwww about 2 yearsIt works probably but it isn't a proper way to solve the problem because the reason is a bug - the
-fs
flag should only change font size as you tried to.