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.
I'm in later versions of those packages. But I had the exact same error and installing "requests" package in a recent version did fix the problem.
docker==3.5.0
docker-compose==1.22.0
docker-dev==1.0b2
docker-py==1.10.6
docker-pycreds==0.3.0
dockerpty==0.4.1
requests==2.18.4
However, I then got another error: https://github.com/docker/compose/issues/4401
Applying the change proposed in comments did the trick:
pip uninstall docker
pip uninstall docker-py
pip uninstall docker-compose
pip install docker-compose==1.9.0
Then I got into a third error: https://github.com/docker/docker-py/issues/1916
That I fixed by uninstalling the docker-py pip package which is incompatible with the docker one.
Now docker-compose works.
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With