Error encountered while executing PIP install: error: complete output from command Python egg_ info:

An error encountered while implementing PIP install:
~]# PIP install-u docker-compose

 ERROR: Complete output from command python egg_info:
 ERROR: Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-install-XPRUHU/pycparser/", line 65, in <module>
    cmdclass={'install': install, 'sdist': sdist},
  File "/usr/lib64/python2.7/distutils/", line 112, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/lib/python2.7/site-packages/setuptools/", line 269, in __init__
  File "/usr/lib64/python2.7/distutils/", line 287, in __init__
  File "/usr/lib/python2.7/site-packages/setuptools/", line 302, in finalize_options
    ep.load()(self,, value)
  File "/usr/lib/python2.7/site-packages/pkg_resources/", line 2341, in load
    return self.resolve()
  File "/usr/lib/python2.7/site-packages/pkg_resources/", line 2351, in resolve
    raise ImportError(str(exc))
 ImportError: 'module' object has no attribute 'check_specifier'
ERROR: Command "python egg_info" failed with error code 1 in /tmp/pip-install-XPRUHU/pycparser/

The solution is to simply update setuptools and PIP:
~]# PIP install –upgrade setuptools & & python -m pip install –upgrade pip

Read More: