Jupyter notebook installation and settings

install jupyter notebook

1
2
pip3 install --upgrade pip
pip3 install jupyter

Genrate and edit config for jupyter notebook

generate config in home directory ~/.jupyter

1
jupyter notebook --generate-config

edit the config file ~/.jupyter/jupyter_notebook_config.py, insert the below lines (my settings) at the start of the file.

1
2
3
4
c.NotebookApp.password = u'sha1:...(your password)'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 5050
c.IPKernelApp.matplotlib = 'inline'

Here you should generate password by running python, and enter

1
2
from notebook.auth import passwd
passwd()

Copy the output encryption password and paste it into the config file.

Run jupyter notebook

Run

1
jupyter notebook

or in background

1
nohup jupyter notebook > jupyter.log &

Install theme for jupyter

Github: https://github.com/dunovank/jupyter-themes

Install with pip

1
2
3
4
5
# install jupyterthemes
pip3 install jupyterthemes

# upgrade to latest version
pip3 install --upgrade jupyterthemes

My recommended setting

1
jt -t onedork -f roboto -N

Install plugins/extensions

Github: https://github.com/ipython-contrib/jupyter_contrib_nbextensions

Install with pip

1
pip3 install jupyter_contrib_nbextensions

Install javascript and css files

1
jupyter contrib nbextension install --user

Note here --user to install into the user’s home jupyter directories. Go to your jupyter notebook page, then you can find Nbexntensions on the menu, click it and feel free to enable or disable the extensions.

My enabled extensions: ScrollDown, Snippets Menu, Printview, Scratchpad