Thanks Todd, I’ve tried upgrading docker and this is the output:
Looking in indexes: Simple index, piwheels - Simple index
Requirement already up-to-date: docker in /usr/local/lib/python2.7/dist-packages (4.0.2)
Requirement already satisfied, skipping upgrade: ipaddress>=1.0.16; python_version < “3.3” in /usr/lib/python2.7/dist-packages (from docker) (1.0.17)
Requirement already satisfied, skipping upgrade: six>=1.4.0 in /usr/lib/python2.7/dist-packages (from docker) (1.12.0)
Requirement already satisfied, skipping upgrade: websocket-client>=0.32.0 in /usr/local/lib/python2.7/dist-packages (from docker) (0.56.0)
Requirement already satisfied, skipping upgrade: requests!=2.18.0,>=2.14.2 in /usr/local/lib/python2.7/dist-packages (from docker) (2.20.1)
Requirement already satisfied, skipping upgrade: backports.ssl-match-hostname>=3.5; python_version < “3.5” in /usr/local/lib/python2.7/dist-packages (from docker) (3.7.0.1)
Requirement already satisfied, skipping upgrade: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python2.7/dist-packages (from requests!=2.18.0,>=2.14.2->docker) (3.0.4)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in /usr/local/lib/python2.7/dist-packages (from requests!=2.18.0,>=2.14.2->docker) (2019.6.16)
Requirement already satisfied, skipping upgrade: urllib3<1.25,>=1.21.1 in /usr/local/lib/python2.7/dist-packages (from requests!=2.18.0,>=2.14.2->docker) (1.24.3)
Requirement already satisfied, skipping upgrade: idna<2.8,>=2.5 in /usr/local/lib/python2.7/dist-packages (from requests!=2.18.0,>=2.14.2->docker) (2.7)
After this, docker-compose returns:
Traceback (most recent call last):
File “/usr/local/bin/docker-compose”, line 6, in
from compose.cli.main import main
File “/usr/local/lib/python2.7/dist-packages/compose/cli/main.py”, line 17, in
import docker
File “/usr/local/lib/python2.7/dist-packages/docker/init.py”, line 2, in
from .api import APIClient
File “/usr/local/lib/python2.7/dist-packages/docker/api/init.py”, line 2, in
from .client import APIClient
File “/usr/local/lib/python2.7/dist-packages/docker/api/client.py”, line 10, in
from .build import BuildApiMixin
File “/usr/local/lib/python2.7/dist-packages/docker/api/build.py”, line 6, in
from … import auth
File “/usr/local/lib/python2.7/dist-packages/docker/auth.py”, line 9, in
from .utils import config
File “/usr/local/lib/python2.7/dist-packages/docker/utils/init.py”, line 3, in
from .decorators import check_resource, minimum_version, update_headers
File “/usr/local/lib/python2.7/dist-packages/docker/utils/decorators.py”, line 4, in
from . import utils
File “/usr/local/lib/python2.7/dist-packages/docker/utils/utils.py”, line 13, in
from … import tls
File “/usr/local/lib/python2.7/dist-packages/docker/tls.py”, line 5, in
from .transport import SSLHTTPAdapter
File “/usr/local/lib/python2.7/dist-packages/docker/transport/init.py”, line 3, in
from .ssladapter import SSLHTTPAdapter
File “/usr/local/lib/python2.7/dist-packages/docker/transport/ssladapter.py”, line 23, in
from backports.ssl_match_hostname import match_hostname
ImportError: No module named ssl_match_hostname
Is there a way I can essentially reset my Python config? I think it did have Python 2 out of the box which I think might be causing the issue? Do I need Python 3 only? Or how do I exclusively use Python 3’s pip?
Thanks for all your help.