Compose: docker-compose fails to start with a "The 'docker-compose==1.24.1' distribution was not found"

Created on 11 Nov 2019  Â·  4Comments  Â·  Source: docker/compose

Description of the issue

docker-compose fails to start

Context information (for bug reports)

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

Output of docker-compose version
Cannot run docker-compose!

Output of docker version

➜ docker version
Client:
 Version:           19.03.4-ce
 API version:       1.40
 Go version:        go1.13.1
 Git commit:        9013bf583a
 Built:             Sat Oct 19 04:40:07 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          19.03.4-ce
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.1
  Git commit:       9013bf583a
  Built:            Sat Oct 19 04:39:38 2019
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.3.0.m
  GitCommit:        d50db0a42053864a270f648048f9a8b4f24eced3.m
 runc:
  Version:          1.0.0-rc9
  GitCommit:        d736ef14f0288d6993a1845745d6756cfc9ddd5a
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

$ python --version
Python 3.7.4



md5-e7ebea4aa895006b06df0fc93d787b01



 uname -a
Linux serenity 5.3.8-arch1-1 #1 SMP PREEMPT @1572357769 x86_64 GNU/Linux

Installed through curl. (I run another install to make sure I had the latest)

kinbug

Most helpful comment

All I did was to comment out the:

#[community-testing]
#Include = /etc/pacman.d/mirrorlist

section from my /etc/pacman.conf, and then pacman -Syyu (I think). End effect is that you do not use packages from the community-testing repos that was causing problems (apparently due to some, well, testing?) I have not turned them on since.

Good luck, hope it helps!

All 4 comments

Closing this is it appeared to be some packaging issues with python on my arch install. Just had to remove the community-testing repo and downgrade my packages.

@stratosgear I'm running into the same issue, a more detailed explanation of the solution would be great.
Thanks!

All I did was to comment out the:

#[community-testing]
#Include = /etc/pacman.d/mirrorlist

section from my /etc/pacman.conf, and then pacman -Syyu (I think). End effect is that you do not use packages from the community-testing repos that was causing problems (apparently due to some, well, testing?) I have not turned them on since.

Good luck, hope it helps!

Another answer: I did aurman -S docker-compose-bin and then running docker-compose is good!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maltefiala picture maltefiala  Â·  3Comments

leiblix picture leiblix  Â·  3Comments

HackerWilson picture HackerWilson  Â·  3Comments

bergtwvd picture bergtwvd  Â·  3Comments

dimsav picture dimsav  Â·  3Comments