Running TensorFlow in Jupyter


In order to run TensorFlow in Jupyter notebook in the conda environment that is installed in, need to do the following:

source activate myenv
python -m ipykernel install --user --name myenv --display-name "Python (TF)"

The second command creates a Jupyter kernel that you can initiate from Jupyter notebook. Once that is done, you should be able to

import tensorflow

You may need to install pip install ipykernel before running the above command.

Omar Jamil

Exeter, England
Email me

I am a Senior Scientist at the UK Met Office, using machine learning to develop and improve the physics in the weather and climate model. I specialise in radiative transfer with remote sensing applications. In short, I create mathematical and physics models to make sense of data.