How to install Jupyter on a Raspberry Pi

First let's install some dependencies:

sudo apt-get update;
sudo apt-get install python3-dev python3-pip build-essential libzmq3-dev;
sudo apt-get install python-zmq
sudo python3 -m pip install --upgrade pip
sudo pip3 install jupyter;
# wait, this process takes about an hour or more

Running jupyter notebook while ssh-ed into the pi:

jupyter notebook --generate-config;
jupyter notebook --ip= --no-browser; # now it accessable on the whole network;

Running on startup:

Edit: /etc/crontab at the bottom of the file (after the last '#'):

@reboot pi cd /home/pi/ && jupyter notebook --ip= --no-browser &