Category Archives: Uncategorized

How to upgrade TensorFlow in Watson Studio Jupyter Notebook

I recently wanted to learn more about TensorFlow and as a Watson Solution Architect, I am using Watson Studio Jupyter Notebooks. On my first test I had an error on the second command.

I realized I was using an old version. Let’s see how to upgrade to a newer version. Watson Machine Learning is using TensorFlow version 1.11 so I wanted to use the same one. Here are the steps.

#Install a pip package in the current Jupyter kernel
import sys
  !{sys.executable} -m pip install tensorflow==1.11.0

This will install tensorflow version 1.11. It should whow the download of the version. To check the version number, here is the command.

import tensorflow as tf
 print(tf.version)

If you don’t get 1.11.0, you may need to restart the kernel.


Now everything is working.

Next step : configure directly an environment to select the components version.

How to avoid Google to crawl a website

Add a robots.txt file at the root directory with the following content.

User-agent: * 
Disallow: /