This issue is still present on the master branch (although not in the 0.3.1 releases), and is being tracked here #5400 25.
As a hack to get jupyter notebooks working, add import torch as the first line in ~/anaconda3/lib/python3.6/site-packages/ipykernel/__init__.py (or where-ever you installed your Python).