In order to use the Docker SDK for Python, I\'m trying to import docker
in a Python script, but it\'s resulting in an ImportError
with the following tr
Don't install it with other backports packages until fixed (if they fix it)
Seen in https://bitbucket.org/ambv/configparser/issues/17/importerror-when-used-with-other-backports#comment-36669436 :
Michał Górny
Well, I just wanted to report the core issue here but it seems that other already have learned it the hard way.
Long story short, you can't ever mix pkg_resources namespaces and pkgutil namespaces. It's explained in the Python packaging guide. Attempting to import both is probably the best way to cause random breakage for everyone. You have to decide on one of them, and use it consistently across all packages using the backports namespace.
Now, the backports package seems to serve the sole purpose of claiming the namespace, and it uses pkgutil. So I'd suggest following that one.