TransWikia.com

Python exception when installing docker-compose

Raspberry Pi Asked by skematic on November 15, 2021

I have tried installing docker-compose on my jessie dist

sudo pip3 install docker-compose

However it encounters an exception

Downloading/unpacking docker-compose
  Downloading docker_compose-1.24.1-py2.py3-none-any.whl (134kB): 134kB downloaded
Requirement already satisfied (use --upgrade to upgrade): six<2,>=1.3.0 in /usr/lib/python3/dist-packages (from docker-compose)
Downloading/unpacking cached-property<2,>=1.2.0 (from docker-compose)
  Downloading cached_property-1.5.1-py2.py3-none-any.whl
Downloading/unpacking docopt<0.7,>=0.6.1 (from docker-compose)
  Downloading docopt-0.6.2.tar.gz
  Running setup.py (path:/tmp/pip-build-b57ky9od/docopt/setup.py) egg_info for package docopt
Downloading/unpacking PyYAML<4.3,>=3.10 (from docker-compose)
  Downloading PyYAML-3.13.tar.gz (270kB): 270kB downloaded
  Running setup.py (path:/tmp/pip-build-b57ky9od/PyYAML/setup.py) egg_info for package PyYAML
Downloading/unpacking backports.ssl-match-hostname>=3.5; python_version < "3.5" (from docker-compose)
  Downloading backports.ssl_match_hostname-3.7.0.1.tar.gz
  Running setup.py (path:/tmp/pip-build-b57ky9od/backports.ssl-match-hostname/setup.py) egg_info for package backports.ssl-match-hostname
Requirement already satisfied (use --upgrade to upgrade): requests!=2.11.0,!=2.12.2,!=2.18.0,<2.21,>=2.6.1 in /usr/lib/python3/dist-packages (from docker-compose)
Downloading/unpacking websocket-client<1.0,>=0.32.0 (from docker-compose)
  Downloading websocket_client-0.56.0-py2.py3-none-any.whl (200kB): 200kB downloaded
Downloading/unpacking jsonschema<3,>=2.5.1 (from docker-compose)
  Downloading jsonschema-2.6.0-py2.py3-none-any.whl
Downloading/unpacking texttable<0.10,>=0.9.0 (from docker-compose)
  Downloading texttable-0.9.1.tar.gz
  Running setup.py (path:/tmp/pip-build-b57ky9od/texttable/setup.py) egg_info for package texttable
Downloading/unpacking docker[ssh]<4.0,>=3.7.0 (from docker-compose)
  Downloading docker-3.7.3-py2.py3-none-any.whl (134kB): 134kB downloaded
Downloading/unpacking dockerpty<0.5,>=0.4.1 (from docker-compose)
  Downloading dockerpty-0.4.1.tar.gz
  Running setup.py (path:/tmp/pip-build-b57ky9od/dockerpty/setup.py) egg_info for package dockerpty
Requirement already satisfied (use --upgrade to upgrade): urllib3==1.16 in /usr/lib/python3/dist-packages (from requests!=2.11.0,!=2.12.2,!=2.18.0,<2.21,>=2.6.1->docker-compose)
Downloading/unpacking docker-pycreds>=0.4.0 (from docker[ssh]<4.0,>=3.7.0->docker-compose)
  Downloading docker_pycreds-0.4.0-py2.py3-none-any.whl
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 290, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python3/dist-packages/pip/req.py", line 1091, in prepare_files
    req_to_install.check_if_exists()
  File "/usr/lib/python3/dist-packages/pip/req.py", line 811, in check_if_exists
    self.satisfied_by = pkg_resources.get_distribution(self.req)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 553, in get_distribution
    dist = get_provider(dist)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 427, in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
IndexError: list index out of range

I have tried

sudo apt update
sudo apt upgrade

But it didn’t help

One Answer

There is a docker-compose in the apt repository (at least for Buster) which would be preferable to pip, but Jessie is obsolete and unsupported so who knows.

Answered by Milliways on November 15, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP