Compose: Docker-compose Install: No module named docker.errors

Created on 6 Nov 2017  路  6Comments  路  Source: docker/compose

Hello every one ,
I'm facing this issue when i'm installing docker-compose

OS: ubuntu 14.04

docker --version
Docker version 17.05.0-ce, build 89658be
pip freeze | grep docker
docker==2.5.1
docker-pycreds==0.2.1
dockerpty==0.4.1

pip install docker-compose
Installing collected packages: docker-compose
Successfully installed docker-compose-1.17.0

docker-compose --version

Traceback (most recent call last):
File "/usr/local/bin/docker-compose", line 7, in
from compose.cli.main import main
File "/usr/local/lib/python2.7/dist-packages/compose/cli/main.py", line 17, in
from . import errors
File "/usr/local/lib/python2.7/dist-packages/compose/cli/errors.py", line 11, in
from docker.errors import APIError
ImportError: No module named docker.errors

Any solution for this error , thank you for your help.

Most helpful comment

@bainim well the link is dead and nor google nor the internet archive seem to have a copy.. got any tips about how to solve the issue? :)

Just google and found solution, work for me

pip3 uninstall docker-py
pip3 uninstall docker-compose
pip3 install --upgrade --force-reinstall --no-cache-dir docker-compose

Source: https://hacklove.net/discussion/542/docker-compose-conflict-with-docker-py

All 6 comments

thanks it works for me!!

I'm not using pip to install docker-compose. In my case, installing the Debian package python-docker solved a similar problem. Thanks!

@bainim well the link is dead and nor google nor the internet archive seem to have a copy.. got any tips about how to solve the issue? :)

python-docker worked for me. I think it might have been to do with me upgrade my default python from python2 to to python 3 that caused this issue. python-docker solved it

@bainim well the link is dead and nor google nor the internet archive seem to have a copy.. got any tips about how to solve the issue? :)

Just google and found solution, work for me

pip3 uninstall docker-py
pip3 uninstall docker-compose
pip3 install --upgrade --force-reinstall --no-cache-dir docker-compose

Source: https://hacklove.net/discussion/542/docker-compose-conflict-with-docker-py

Was this page helpful?
0 / 5 - 0 ratings