Make jupyter notebook work in WSL

In case you are playing around with the Windows Subsystem for Linux and jupyter, you might have notice this error:

Invalid argument (bundled/zeromq/src/tcp_address.cpp:171)

The issue, which arises because Bash on Windows does not currently expose any network interfaces, has been fixed by Adam Seering in its WSL PPA.

The fix he proposed, though, only works on when you install jupyter using Ubuntu repositories. In case you want to have it working with pip, I found the following to be helpful:

pip uninstall pyzmq
sudo add-apt-repository ppa:aseering/wsl
sudo apt-get update
sudo apt-get install libzmq3 libzmq3-dev
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
pip install --no-use-wheel -v pyzmq
pip install jupyter