title: ImportError: No module named 'backports'
body: <p>While installing retraining model using tensorflow, i ran the following command : </p>
  
  <pre><code>bazel-bin/tensorflow/examples/image_retraining/retrain --image_dir &lt;..directory..&gt;
  </code></pre>
  
  <p>The error:</p>
  
  <pre class="lang-none prettyprint-override"><code>ImportError: No module named 'backports'
  
  Traceback (most recent call last):
    File "/home/nishith/tensorflow/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/examples/image_retraining/retrain.py", line 91, in &lt;module&gt;
      import tensorflow as tf
    File "/home/nishith/tensorflow/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/__init__.py", line 24, in &lt;module&gt;
      from tensorflow.python import *
    File "/home/nishith/tensorflow/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/python/__init__.py", line 64, in &lt;module&gt;
      from tensorflow.python.framework.framework_lib import *
    File "/home/nishith/tensorflow/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/python/framework/framework_lib.py", line 100, in &lt;module&gt;
      from tensorflow.python.framework.subscribe import subscribe
    File "/home/nishith/tensorflow/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/python/framework/subscribe.py", line 26, in &lt;module&gt;
      from tensorflow.python.ops import variables
    File "/home/nishith/tensorflow/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/python/ops/variables.py", line 26, in &lt;module&gt;
      from tensorflow.python.ops import control_flow_ops
    File "/home/nishith/tensorflow/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/python/ops/control_flow_ops.py", line 70, in &lt;module&gt;
      from tensorflow.python.ops import tensor_array_ops
    File "/home/nishith/tensorflow/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/python/ops/tensor_array_ops.py", line 33, in &lt;module&gt;
      from tensorflow.python.util import tf_should_use
    File "/home/nishith/tensorflow/tensorflow/bazel-bin/tensorflow/examples/image_retraining/retrain.runfiles/org_tensorflow/tensorflow/python/util/tf_should_use.py", line 28, in &lt;module&gt;
      from backports import weakref  # pylint: disable=g-bad-import-order
  ImportError: No module named 'backports'
  </code></pre>