2

Most guides that I found to install Docker Compose on Raspbian resolve around an installation via pip, e.g.

sudo pip3 install docker-compose

Unfortunately, if I try that on my Raspberry Pi 3, it fails with the following error:

pi@raspberrypi-2:~/docker-compose $ sudo pip3 install docker-compose
Collecting docker-compose
  Using cached https://files.pythonhosted.org/packages/74/41/fec934f6b895fab91eb73c9253aae1446fcf7512b6e5a2fa0e7b99d080d7/docker_compose-1.29.0-py2.py3-none-any.whl
Collecting requests<3,>=2.20.0 (from docker-compose)
  Using cached https://files.pythonhosted.org/packages/29/c1/24814557f1d22c56d50280771a17307e6bf87b70727d975fd6b2ce6b014a/requests-2.25.1-py2.py3-none-any.whl
Collecting docker[ssh]>=5 (from docker-compose)
  Could not find a version that satisfies the requirement docker[ssh]>=5 (from docker-compose) (from versions: 2.0.0, 2.0.1, 2.0.2, 2.1.0, 2.2.0, 2.2.1, 2.3.0, 2.4.0, 2.4.1, 2.4.2, 2.5.0, 2.5.1, 2.6.0, 2.6.1, 2.7.0, 3.0.0, 3.0.1, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.2.0, 3.2.1, 3.3.0, 3.4.0, 3.4.1, 3.5.0, 3.5.1, 3.6.0, 3.7.0, 3.7.1, 3.7.2, 3.7.3, 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.2.0, 4.2.1, 4.2.2, 4.3.0, 4.3.1, 4.4.0, 4.4.1, 4.4.2, 4.4.3, 4.4.4)
No matching distribution found for docker[ssh]>=5 (from docker-compose)

This seems to be a rare problem, as I could not find other reports of this complication.

3
  • Are you able to re-create the same error with a current and supported version of the OS. Raspbian Buster replaced Raspbian Stretch in 2019. RaspiOS 32-Bit Buster replaced Raspbian in 2020.
    – Dougie
    Apr 11 at 15:02
  • what version of docker is installed? Apr 12 at 0:24
  • Having the same version with Docker version 20.10.6, build 370c289. Could you solve it? Apr 20 at 15:39
3

Had the same issue because the OS is a bit outdated. The version 1.28+ requires a library not available. simple solution install the latest 1.27

sudo pip3 install "docker-compose<1.28"

1
  • Thanks! This worked for me
    – Muffo
    Jun 14 at 4:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.