DEV Community

loading...

Discussion on: Installing Docker and Docker Compose on the Raspberry Pi in 5 Simple Steps

Collapse
vegasbrianc profile image
Brian Christner

It seems a problem with the docker python client. After running docker-compose for the first time. You get the error ImportError: No module named ssl_match_hostname on init

The fix is cp -r /usr/local/lib/python2.7/dist-packages/backports/ssl_match_hostname/ /usr/lib/python2.7/dist-packages/backports

Collapse
rohansawant profile image
Rohan Sawant Author

Hmm, this is weird did you try to install it with Python 3?

Python 2 support ends next year.

Update, in the next few weeks, I'll rewrite this and try again on a fresh installation that should help me find the errors.

Collapse
vegasbrianc profile image
Brian Christner

I was just using the standard installers as listed in your instructions (which are great BTW). Everything from first glance still uses Python2.

Thread Thread
rohansawant profile image
Rohan Sawant Author

Yeah, you are correct, I just re-read my own post and yep everything seems to be using Python 3 😅

Please disregard my last comment.

I'll update the post and fix the remaining issues soon, that should help with my confusion.

Just out of curiosity how did you manage to fix the problem? By copying the dependency? I haven't seen this solution ever before.

Thread Thread
vegasbrianc profile image
Brian Christner

This is specific to ARM Docker deployments. The Ubuntu deployments in the Cloud don't seem to have this issue.

I found people having the similar issue after installing docker-compose - github.com/docker/docker-py/issues...

Collapse
dbrosy profile image
dbrosy

this might be a better option.

sudo apt-get remove python-configparser
Enter fullscreen mode Exit fullscreen mode

After removing configparser docker-compose starts as expected.
I removed after installing compose via pip but noted an error related to configparser at end of install so this might be better run after dependencies but before compose. This part I haven't tried