AttributeError: 'module' object has no attribute 'DockerClient'
See original GitHub issueFollowed example on https://docker-py.readthedocs.io/en/stable/client.html:
>>> import docker
>>> client = docker.DockerClient(base_url='unix://var/run/docker.sock')
Received the following error:
AttributeError: 'module' object has no attribute 'DockerClient'
Additional info:
# pip list | grep docker
docker-py 1.10.6
# python -V
Python 2.7.5
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
python cannot import module - docker - Stack Overflow
import docker c = docker.Client() c.info() ... Client() AttributeError: 'module' object has no attribute 'Client'.
Read more >AttributeError: 'module' object has no attribute 'APIError'
I'm running ansible from an ubuntu 13.10 machine with ansible 1.6.6 on it. I'm using it to build two docker images for nginx...
Read more >Bug #1693425 “Cannot import docker client” : Bugs : Zun
DockerClient. 2017-05-25 14:01:31.608 CRITICAL zun [-] AttributeError: 'module' object has no attribute 'Client' Following error threw when ...
Read more >SALT AttributeError: 'module' object has no attribute 'dockermod'
The error is due to AttributeError: 'module' object that has no attribute 'dockermod'. This is due to a known and fixed regression in...
Read more >docker python sdk not running - Reddit
File "/Users/Akushwaha/Downloads/docker.py", line 5, in <module>. client = docker.from_env(). AttributeError: 'module' object has no ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You’re using the wrong package. Uninstall docker-py and install docker instead.
@shin- , I had to manually delete
/usr/lib/python2.7/site-packages/docker
and install again.