compose: pip install of docker-compose 1.7.1 fails
DESCRIPTION
On Ubuntu Trusty Tahr 14.04, pip install of docker-compose does not install all the dependencies it seems, so running docker-compose results in traceback:
$ sudo pip install docker-compose
$ docker-compose
Traceback (most recent call last):
File "/usr/local/bin/docker-compose", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2749, in <module>
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 446, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 459, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 628, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: backports.ssl-match-hostname>=3.5
This can be fixed by updating the dependent package:
$ sudo pip install backports.ssl_match_hostname --upgrade
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 34
- Comments: 20
I prefer using the force upgrade for this
You should update the dependent package backports.ssl_match_hostname:
[sudo] pip install --upgrade backports.ssl_match_hostname
Fix my problem
I really hope compose will become a part of docker one day. So we can all just do
docker compose
and be happy… 😃You can also use the
docker/compose
image, something like this in your .profile removes a lot of pain;Your
docker-compose
function should handle most of what we normally use it for now. Even tho it now takes half a second extra to start…Going to +1 this, Docker Compose 1.8.0 fails in the same way on a stock Oracle Linux 7 installation (Meaning this fails on CentOS and RHEL as well)
yum install python-pip pip install -U pip pip install docker-compose
Running Docker-Compose at this point from the standard command line provides the traceback error.
–force or --upgrade should NOT be needed on any command lines given docker-compose is not there by default and this is NOT an upgrade installation.
Please either document the need to pip install backports.ssl_match_hostname or include it within the dependencies because it’s NOT getting resolved correctly.
Are we suggesting the default system packages are getting in the way of the pip installation of docker understanding that backports.ssl_match_hostname is a dependency?