Page MenuHomeSolus

docker-compose doesn't work with PyYAML 5.1.2
Closed, ResolvedPublic

Description

After the recent PyYAML update to 5.1.2, docker-compose has stopped working:

Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3126, in <module>
    @_call_aside
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3110, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3139, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 596, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 784, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'PyYAML<5,>=3.10' distribution was not found and is required by docker-compose

Apparently they are going to wait until 5.2 before adding support: https://github.com/docker/compose/issues/6619
Some other distributions have made their own patches where they have removed the upper bounds on versions, so maybe something similar could be the solution? https://github.com/docker/compose/issues/6756

Event Timeline

MadMac created this task.Aug 16 2019, 7:42 PM

Temporary fix:

  1. create virtualenv virtualenv env
  2. Activate virtualenv source ./env/bin/activate
  3. install docker-compose pip install docker-compose
  4. run docker-compose ./env/bin/docker-compose up

Hi, I tried temporary fix, but I get this:
(env) zeljko@optiplex7020  ~/devilbox   master  ./env/bin/docker-compose up
zsh: no such file or directory: ./env/bin/docker-compose

Just run the following instead:

sudo eopkg install https://packages.getsol.us/unstable/d/docker-compose/docker-compose-1.25.0_rc2-20-1-x86_64.eopkg

Thank you Josh. That fixed the issue :)