Took me a few tries to get this working, since I started incorrectly and also did not want anaconda.
activate your virtualenv
$ cd tensorflow
$ source bin/activate
(tensorflow)$ pip install –upgrade pip
(tensorflow)$ pip install ipython
(tensorflow)$ pip install jupyter
(tensorflow)$ which python
(tensorflow)$ which ipython
(tensorflow)$ which jupyter-notebook
(I accidentally removed /usr/local/bin/jupyter which I suspect was a link to/usr/local/bin/jupyter-notebook)
(tensorflow)$ ipython kernelspec install-self –user
This will create a kernelspec for your virtualenv and tell you where it is:
[InstallNativeKernelSpec] Installed kernelspec pythonX in /home/username/.local/share/jupyter/kernels/pythonX
Where pythonX will match the version of Python in your virtualenv.
Copy the new kernelspec somewhere useful. Choose a kernel_name for your new kernel that is not python2 or python3 or one you’ve used before and then:
(tensorflow)$ mkdir -p ~/.ipython/kernels
(tensorflow)$ mv ~/.local/share/jupyter/kernels/pythonX ~/.ipython/kernels/<kernel_name>
Change the name of the kernel that IPython shows, edit ~/.ipython/kernels/<kernel_name>/kernel.json and change the JSON key called display_name to tensrflow.
You should now be able to see your kernel in the IPython notebook menu: Kernel -> Change kernel and be able so switch to it (you may need to refresh the page before it appears in the list). IPython will remember which kernel to use for that notebook from then on.
(thanks to pythonanywhere: http://help.pythonanywhere.com/pages/IPythonNotebookVirtualenvs)
this will open up a browser tab in chrome
In the browser, run a simple test: