title: error when installing tensorflow with pip
body: <p>I tried to install TensorFlow on Ubuntu using <code>pip install tensorflow</code> but it gave me this error</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>   moo&lt;/font&gt;@moo-desktop&gt; pip install tensorflow
  Defaulting to user installation because normal site-packages is not writeable
  Collecting tensorflow
    Using cached tensorflow-2.8.0-cp38-cp38-manylinux2010_x86_64.whl (497.6 MB)
  Collecting tf-estimator-nightly==2.8.0.dev2021122109
    Using cached tf_estimator_nightly-2.8.0.dev2021122109-py2.py3-none-any.whl (462 kB)
  Requirement already satisfied: six&amp;gt;=1.12.0 in /usr/lib/python3/dist-packages (from tensorflow) (1.14.0)
  Collecting libclang&amp;gt;=9.0.1
    Using cached libclang-13.0.0-py2.py3-none-manylinux1_x86_64.whl (14.5 MB)
  Collecting typing-extensions&amp;gt;=3.6.6
    Using cached typing_extensions-4.0.1-py3-none-any.whl (22 kB)
  Collecting absl-py&amp;gt;=0.4.0
    Using cached absl_py-1.0.0-py3-none-any.whl (126 kB)
  Collecting gast&amp;gt;=0.2.1
    Using cached gast-0.5.3-py3-none-any.whl (19 kB)
  Requirement already satisfied: numpy&amp;gt;=1.20 in /usr/local/lib/python3.8/dist-packages (from tensorflow) (1.21.4)
  Collecting tensorboard&amp;lt;2.9,&amp;gt;=2.8
    Using cached tensorboard-2.8.0-py3-none-any.whl (5.8 MB)
  Collecting tensorflow-io-gcs-filesystem&amp;gt;=0.23.1
    Using cached tensorflow_io_gcs_filesystem-0.24.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.1 MB)
  Collecting grpcio&amp;lt;2.0,&amp;gt;=1.24.3
    Using cached grpcio-1.43.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.1 MB)
  Collecting h5py&amp;gt;=2.9.0
    Using cached h5py-3.6.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (4.5 MB)
  Collecting opt-einsum&amp;gt;=2.3.2
    Using cached opt_einsum-3.3.0-py3-none-any.whl (65 kB)
  Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from tensorflow) (45.2.0)
  Collecting protobuf&amp;gt;=3.9.2
    Using cached protobuf-3.19.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)
  Collecting wrapt&amp;gt;=1.11.0
    Using cached wrapt-1.13.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (84 kB)
  Collecting keras-preprocessing&amp;gt;=1.1.1
    Using cached Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB)
  Collecting flatbuffers&amp;gt;=1.12
    Using cached flatbuffers-2.0-py2.py3-none-any.whl (26 kB)
  Collecting astunparse&amp;gt;=1.6.0
    Using cached astunparse-1.6.3-py2.py3-none-any.whl (12 kB)
  Collecting google-pasta&amp;gt;=0.1.1
    Using cached google_pasta-0.2.0-py3-none-any.whl (57 kB)
  Collecting termcolor&amp;gt;=1.1.0
    Using cached termcolor-1.1.0.tar.gz (3.9 kB)
    Preparing metadata (setup.py) ... error
    &lt;font color="#CC0000"&gt;&lt;b&gt;error&lt;/b&gt;&lt;/font&gt;: &lt;b&gt;subprocess-exited-with-error&lt;/b&gt;
    
    &lt;font color="#CC0000"&gt;×&lt;/font&gt; &lt;font color="#4E9A06"&gt;python setup.py egg_info&lt;/font&gt; did not run successfully.
    &lt;font color="#CC0000"&gt;│&lt;/font&gt; exit code: &lt;font color="#06989A"&gt;&lt;b&gt;1&lt;/b&gt;&lt;/font&gt;
    &lt;font color="#CC0000"&gt;╰─&amp;gt;&lt;/font&gt; &lt;font color="#CC0000"&gt;[20 lines of output]&lt;/font&gt;
    &lt;font color="#CC0000"&gt;   &lt;/font&gt; Traceback (most recent call last):
    &lt;font color="#CC0000"&gt;   &lt;/font&gt;   File &amp;quot;&amp;lt;string&amp;gt;&amp;quot;, line 2, in &amp;lt;module&amp;gt;
    &lt;font color="#CC0000"&gt;   &lt;/font&gt;   File &amp;quot;&amp;lt;pip-setuptools-caller&amp;gt;&amp;quot;, line 34, in &amp;lt;module&amp;gt;
    &lt;font color="#CC0000"&gt;   &lt;/font&gt;   File &amp;quot;/tmp/pip-install-p4b76c4_/termcolor_58302b6ceeac4cefa16f556d214c21da/setup.py&amp;quot;, line 37, in &amp;lt;module&amp;gt;
    &lt;font color="#CC0000"&gt;   &lt;/font&gt;     setup(name=&amp;apos;termcolor&amp;apos;,
    &lt;font color="#CC0000"&gt;   &lt;/font&gt;   File &amp;quot;/usr/lib/python3.8/distutils/core.py&amp;quot;, line 108, in setup
    &lt;font color="#CC0000"&gt;   &lt;/font&gt;     _setup_distribution = dist = klass(attrs)
    &lt;font color="#CC0000"&gt;   &lt;/font&gt;   File &amp;quot;/usr/lib/python3/dist-packages/setuptools/dist.py&amp;quot;, line 447, in __init__
    &lt;font color="#CC0000"&gt;   &lt;/font&gt;     _Distribution.__init__(self, {
    &lt;font color="#CC0000"&gt;   &lt;/font&gt;   File &amp;quot;/usr/lib/python3.8/distutils/dist.py&amp;quot;, line 292, in __init__
    &lt;font color="#CC0000"&gt;   &lt;/font&gt;     self.finalize_options()
    &lt;font color="#CC0000"&gt;   &lt;/font&gt;   File &amp;quot;/usr/lib/python3/dist-packages/setuptools/dist.py&amp;quot;, line 740, in finalize_options
    &lt;font color="#CC0000"&gt;   &lt;/font&gt;     ep.load()(self)
    &lt;font color="#CC0000"&gt;   &lt;/font&gt;   File &amp;quot;/usr/lib/python3/dist-packages/pkg_resources/__init__.py&amp;quot;, line 2444, in load
    &lt;font color="#CC0000"&gt;   &lt;/font&gt;     self.require(*args, **kwargs)
    &lt;font color="#CC0000"&gt;   &lt;/font&gt;   File &amp;quot;/usr/lib/python3/dist-packages/pkg_resources/__init__.py&amp;quot;, line 2467, in require
    &lt;font color="#CC0000"&gt;   &lt;/font&gt;     items = working_set.resolve(reqs, env, installer, extras=self.extras)
    &lt;font color="#CC0000"&gt;   &lt;/font&gt;   File &amp;quot;/usr/lib/python3/dist-packages/pkg_resources/__init__.py&amp;quot;, line 787, in resolve
    &lt;font color="#CC0000"&gt;   &lt;/font&gt;     raise DistributionNotFound(req, requirers)
    &lt;font color="#CC0000"&gt;   &lt;/font&gt; pkg_resources.DistributionNotFound: The &amp;apos;packaging&amp;gt;=20.0&amp;apos; distribution was not found and is required by the application
    &lt;font color="#CC0000"&gt;   &lt;/font&gt; &lt;font color="#CC0000"&gt;[end of output]&lt;/font&gt;
    
    &lt;font color="#75507B"&gt;&lt;b&gt;note&lt;/b&gt;&lt;/font&gt;: This error originates from a subprocess, and is likely not a problem with pip.
  &lt;font color="#CC0000"&gt;&lt;b&gt;error&lt;/b&gt;&lt;/font&gt;: &lt;b&gt;metadata-generation-failed&lt;/b&gt;
  
  &lt;font color="#CC0000"&gt;×&lt;/font&gt; Encountered error while generating package metadata.
  &lt;font color="#CC0000"&gt;╰─&amp;gt;&lt;/font&gt; See above for output.
  
  &lt;font color="#75507B"&gt;&lt;b&gt;note&lt;/b&gt;&lt;/font&gt;: This is an issue with the package mentioned above, not pip.
  &lt;font color="#06989A"&gt;&lt;b&gt;hint&lt;/b&gt;&lt;/font&gt;: See above for details.
  &lt;/pre&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>I update pip to the last version but it didn't work any idea how to resolve the error</p>