title: ImportError: Could not import the Python Imaging Library (PIL) required to load image files on tensorflow
body: <p>I am doing a deep learning course on udacity. For the first assignment whenI tried to run the script which is below the problem 1 , I got this error. So I tried to uninstall PIL and pillow and then installed these individually but I didnot succeeded.
  I need help guy. I am using tensorflow docker image with python notebook.</p>
  
  <pre><code># These are all the modules we'll be using later. Make sure you can import them
  # before proceeding further.
  from __future__ import print_function
  import matplotlib.pyplot as plt
  import numpy as np
  import os
  import sys
  import scipy
  import tarfile
  from IPython.display import display, Image
  from scipy import ndimage
  from sklearn.linear_model import LogisticRegression
  from six.moves.urllib.request import urlretrieve
  from six.moves import cPickle as pickle
  # Config the matplotlib backend as plotting inline in IPython
  %matplotlib inline 
  
  url = 'http://commondatastorage.googleapis.com/books1000/'
  last_percent_reported = None
  
  def download_progress_hook(count, blockSize, totalSize):
      percent = int(count * blockSize * 100 / totalSize)
  
     if last_percent_reported != percent:
       if percent % 5 == 0:
    sys.stdout.write("%s%%" % percent)
    sys.stdout.flush()
  else:
    sys.stdout.write(".")
    sys.stdout.flush()
  
  last_percent_reported = percent
  </code></pre>
  
  <p><a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/udacity/1_notmnist.ipynb" rel="noreferrer">https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/udacity/1_notmnist.ipynb</a></p>
  
  <p>You can see the code here. I got error in the code block after problem 1
  <a href="https://i.stack.imgur.com/XSRvK.jpg" rel="noreferrer">Error Image</a></p>
  
  <p>I tried each and everything describe here in these two links or solutions:</p>
  
  <p><a href="https://stackoverflow.com/questions/35534220/importerror-could-not-import-the-python-imaging-library-pil-required-to-load">Solution 1 on stackoverflow</a></p>
  
  <p><a href="https://stackoverflow.com/questions/26720968/pil-importerror-the-imaging-extension-was-built-for-another-version-of-pillow">Solution 2 on stackoverflow</a></p>
  
  <p>Operating System:</p>
  
  <p>using docker and tensorflow is installed in a container with IPython notebook.</p>
  
  <p>The output from python -c "import tensorflow; print(tensorflow.<strong>version</strong>)".</p>
  
  <p>0.11.0</p>