If you're working on CentOS7 or similar, you may not want to install unpackaged code via pip. In which case, it's good to know that the Extras channel has a package python-docker-py. I had this problem, installed that package, and was off to the races.