pkg_resources.DistributionNotFound: The ‘backports.ssl-match-hostname>=3.5;

Pocket

docker

[root@astel]# docker-compose down
Traceback (most recent call last):
  File "/bin/docker-compose", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2953, in <module>
    @_call_aside
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2939, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2966, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 637, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 650, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 829, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'backports.ssl-match-hostname>=3.5; python_version < "3.5"' distribution was not found and is required by docker-py

解決方法

[root@astel]# pip install --upgrade backports.ssl_match_hostname
Collecting backports.ssl_match_hostname
  Downloading backports.ssl_match_hostname-3.5.0.1.tar.gz
Installing collected packages: backports.ssl-match-hostname
  Found existing installation: backports.ssl-match-hostname 3.4.0.2
    Uninstalling backports.ssl-match-hostname-3.4.0.2:
      Successfully uninstalled backports.ssl-match-hostname-3.4.0.2
  Running setup.py install for backports.ssl-match-hostname ... done
Successfully installed backports.ssl-match-hostname-3.5.0.1
[root@astel]# docker-compose down
Removing wp ... done
Removing db ... done

コメントを残す

メールアドレスが公開されることはありません。