Your Raspi is also your Docker server?
If yes what happens if you do a “import docker” inside your python environment? As you error message only happens if an import error occurs.
It is also possible to test the mk_docker.py script with the command line options “–debug” and “-v” for a little bit more output.