ImportError: No module named ssl_match_hostname when importing the docker SDK for Python : <p>In order to use the <a href="https://docker-py.readthedocs.io/en/stable/client.html" rel="noreferrer">Docker SDK for Python</a>, I'm trying to <code>import docker</code> in a Python script, but it's resulting in an <code>ImportError</code> with the following traceback:</p>

<pre><code>Traceback (most recent call last):
  File "/home/kurt/dev/clones8/ipercron-compose/furion/iclib/tests/test_utils/docker_utils.py", line 1, in &lt;module&gt;
    import docker
  File "/home/kurt/.local/lib/python2.7/site-packages/docker/__init__.py", line 6, in &lt;module&gt;
    from .client import Client, AutoVersionClient, from_env # flake8: noqa
  File "/home/kurt/.local/lib/python2.7/site-packages/docker/client.py", line 11, in &lt;module&gt;
    from . import api
  File "/home/kurt/.local/lib/python2.7/site-packages/docker/api/__init__.py", line 2, in &lt;module&gt;
    from .build import BuildApiMixin
  File "/home/kurt/.local/lib/python2.7/site-packages/docker/api/build.py", line 9, in &lt;module&gt;
    from .. import utils
  File "/home/kurt/.local/lib/python2.7/site-packages/docker/utils/__init__.py", line 2, in &lt;module&gt;
    from .utils import (
  File "/home/kurt/.local/lib/python2.7/site-packages/docker/utils/utils.py", line 19, in &lt;module&gt;
    from .. import tls
  File "/home/kurt/.local/lib/python2.7/site-packages/docker/tls.py", line 5, in &lt;module&gt;
    from .ssladapter import ssladapter
  File "/home/kurt/.local/lib/python2.7/site-packages/docker/ssladapter/__init__.py", line 1, in &lt;module&gt;
    from .ssladapter import SSLAdapter # flake8: noqa
  File "/home/kurt/.local/lib/python2.7/site-packages/docker/ssladapter/ssladapter.py", line 21, in &lt;module&gt;
    from backports.ssl_match_hostname import match_hostname
ImportError: No module named ssl_match_hostname
[Finished in 0.2s with exit code 1]
[shell_cmd: python -u "/home/kurt/dev/clones8/ipercron-compose/furion/iclib/tests/test_utils/docker_utils.py"]
[dir: /home/kurt/dev/clones8/ipercron-compose/furion/iclib/tests/test_utils]
[path: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin]
</code></pre>

<p>The strange thing is that the import does work in other places, for example in an iPython prompt:</p>

<pre><code>Python 2.7.12 (default, Nov 19 2016, 06:48:10) 
Type "copyright", "credits" or "license" for more information.

IPython 2.4.1 -- An enhanced Interactive Python.
?         -&gt; Introduction and overview of IPython's features.
%quickref -&gt; Quick reference.
help      -&gt; Python's own help system.
object?   -&gt; Details about 'object', use 'object??' for extra details.

In [1]: import docker

In [2]: 
</code></pre>

<p>Why is the import not working in the first case?</p>
