Compose: DistributionNotFound when running docker-compose up

Created on 17 Mar 2020  路  2Comments  路  Source: docker/compose

I ran into this DistributionNotFound error when running docker-compose up today which never happened before. I am not sure how to fix it but I suspect it has something to do with python 3.6, which I recently used extensively for another project. Any idea how to solve it? Below is the output from running docker-compose up

Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/home/rickygeng/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3251, in <module>
    @_call_aside
  File "/home/rickygeng/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside
    f(*args, **kwargs)
  File "/home/rickygeng/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/home/rickygeng/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/home/rickygeng/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/rickygeng/.local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'docker-compose==1.17.1' distribution was not found and is required by the application

Most helpful comment

I had the same issue and I did the following:

sudo apt-get remove docker-compose
pip3 install -U docker-compose

All 2 comments

It turns out that the python3.6 is corrupted. Closing this issue.

I had the same issue and I did the following:

sudo apt-get remove docker-compose
pip3 install -U docker-compose
Was this page helpful?
0 / 5 - 0 ratings