ImportError: No module named backports.ssl_match_hostname
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
docker-compose (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
The error ImportError: No module named backports.
% docker-compose
Traceback (most recent call last):
File "/usr/bin/
load_
File "/usr/lib/
return get_distributio
File "/usr/lib/
return ep.load()
File "/usr/lib/
return self.resolve()
File "/usr/lib/
module = __import_
File "/usr/lib/
from . import errors
File "/usr/lib/
from docker.errors import APIError
File "/usr/lib/
from .api import APIClient
File "/usr/lib/
from .client import APIClient
File "/usr/lib/
from .build import BuildApiMixin
File "/usr/lib/
from .. import utils
File "/usr/lib/
from .build import tar, exclude_paths
File "/usr/lib/
from .utils import create_archive
File "/usr/lib/
from .. import tls
File "/usr/lib/
from .transport import SSLAdapter
File "/usr/lib/
from .ssladapter import SSLAdapter
File "/usr/lib/
from backports.
ImportError: No module named backports.
Probable reason: On my system (ubuntu 18.04) docker.io is
Package: docker.io
Version: 18.09.7-
but docker-compose is
Package: docker-compose
Version: 1.17.1-2
Loading a newer docker-compose binary from the git repo (e.g. 1.24.0) solves the problem, but it's still a flaw if the ubuntu packages need to be fixed by replacing binaries with external files.
E.g. download with
sudo curl -L "https:/
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: docker-compose 1.17.1-2
ProcVersionSign
Uname: Linux 4.15.0-60-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.9-0ubuntu7.7
Architecture: amd64
CurrentDesktop: XFCE
Date: Fri Oct 4 12:36:47 2019
InstallationDate: Installed on 2018-06-09 (481 days ago)
InstallationMedia: Lubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
PackageArchitec
SourcePackage: docker-compose
UpgradeStatus: No upgrade log present (probably fresh install)
Status changed to 'Confirmed' because the bug affects multiple users.