title: How to fix: "ModuleNotFoundError: No module named 'tensorflow.contrib'"
body: <p>I'm trying to build an image classifier, and want to import tflearn. </p>
  
  <pre><code># Importing the required libraries
  import tflearn
  from tflearn.layers.conv import conv_2d, max_pool_2d
  from tflearn.layers.core import input_data, dropout, fully_connected
  from tflearn.layers.estimator import regression
  import tensorflow as tf
  </code></pre>
  
  <p>However, I'm unable to do so, due to the following error message.</p>
  
  <pre><code>File "imgclassification.py", line 97, in &lt;module&gt;
      import tflearn
    File "/usr/local/lib/python3.7/site-packages/tflearn/__init__.py", line 4, in &lt;module&gt;
      from . import config
    File "/usr/local/lib/python3.7/site-packages/tflearn/config.py", line 5, in &lt;module&gt;
      from .variables import variable
    File "/usr/local/lib/python3.7/site-packages/tflearn/variables.py", line 7, in &lt;module&gt;
      from tensorflow.contrib.framework.python.ops import add_arg_scope as contrib_add_arg_scope
  ModuleNotFoundError: No module named 'tensorflow.contrib'
  </code></pre>
  
  <p>Apparently, tensorflow.contrib was deprecated in the latest release of TensorFlow.</p>
  
  <p>The number of error messages increased when I uninstalled TensorFlow 2.0 and installed TensorFlow 1.14. Most of them are warnings.</p>
  
  <p>How do I fix this?</p>