docker-compose fail to build docker image

I try to use docker-compose to build the docker #3 birthday “voting-app” with following error, looks like docker-compose is not compatible with the latest version of docker-py being installed by LEAP 42.1.

docker-compose up -d
Traceback (most recent call last):
File “/usr/bin/docker-compose”, line 5, in <module>
from pkg_resources import load_entry_point
File “/usr/lib/python2.7/site-packages/pkg_resources/”, line 3084, in <module>
File “/usr/lib/python2.7/site-packages/pkg_resources/”, line 3070, in _call_aside
f(*args, **kwargs)
File “/usr/lib/python2.7/site-packages/pkg_resources/”, line 3097, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File “/usr/lib/python2.7/site-packages/pkg_resources/”, line 653, in _build_master
return cls._build_from_requirements(requires)
File “/usr/lib/python2.7/site-packages/pkg_resources/”, line 666, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File “/usr/lib/python2.7/site-packages/pkg_resources/”, line 839, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The ‘docker-py<1.2,>=1.0.0’ distribution was not found and is required by docker-compose

docker-compose install is version 1.2.0-5.2, docker-py installed is version 1.3.1-2.2

Although I’d have to use docker-compose more to become familiar with it,

My first impression is that you more likely have a lower level problem, possibly in your Docker file(s)… Have you tested and run your Docker file successfully? The errors you’re throwing don’t look like orchestration type errors (which is what docker-compose does).

If you’re truly stumped, you need to post your Docker file, the docker-compose yml script and anything else that might be necessary so others can evaluate what you are doing.


It’s a bug…

As per comment 4, use the following repo;

I’m sure we are using a much later version of docker than the posts in that bug which should have incorporated the referenced upstream fixes.

Yes, maybe the virtualization/container repo should be used, but before doing that,
Make sure you updated your system and are not using packages from the original LEAP release

zypper up


It’s the later versions that have the issue (on SLES 12 SP1 I had to rollback a couple of python packages), the fix is on it’s way, the last entry was a few days ago, the bug has been around for some time now…

After I did zypper up and build individual image without any issue.
I still got the same error from docker-compose 1.2.0-5.2.

In order for me to build the docker container, I did

  1. Add Virtualization:/containers repository
  2. Updated docker to version 1.10.3-90.1
  3. Updated docker-compose to version 1.6.2-21.1
  4. Updated python-docker-py to 1.7.2-51

I guess you are saying that your current configuration was able to successfully run docker-compose?
According to the bugzilla, you are currently updated with the latest for both docker and docker-compose <which should work>.
And yes, according to the bugzilla, the earlier version of docker-compose was mis-matched, requiring older libraries which caused the fail.