0

Running the docker-compose -f docker/common/docker-compose.yml up I get the error:

Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 5, in <module>
    from compose.cli.main import main
  File "/usr/lib/python2.7/site-packages/compose/cli/main.py", line 18, in <module>
    import docker.errors
  File "/usr/lib/python2.7/site-packages/docker/__init__.py", line 2, in <module>
    from .api import APIClient
  File "/usr/lib/python2.7/site-packages/docker/api/__init__.py", line 2, in <module>
    from .client import APIClient
  File "/usr/lib/python2.7/site-packages/docker/api/client.py", line 5, in <module>
    import requests
  File "/usr/lib/python2.7/site-packages/requests/__init__.py", line 43, in <module>
    import urllib3
  File "/usr/lib/python2.7/site-packages/urllib3/__init__.py", line 10, in <module>
    from .connectionpool import (
  File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 31, in <module>
    from .connection import (
  File "/usr/lib/python2.7/site-packages/urllib3/connection.py", line 45, in <module>
    from .util.ssl_ import (
  File "/usr/lib/python2.7/site-packages/urllib3/util/__init__.py", line 4, in <module>
    from .request import make_headers

The Python version: Python 2.7.5

The above command used to work just fine before the latest system updates.


UPDATE

Upgrading Python to 3.x then upgrading docker-compose to the latest version solved this issue.

1
  • Probably you have an issue with the request package. What' is the output of the pip freeze in that environment?
    – zappee
    Commented May 18, 2020 at 6:54

1 Answer 1

1

docker Compose project for python 2.7 has End of life .

please update to you system python to 3.X and install latest version of docker compose

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.