ModuleNotFoundError: No module named 'docker'
See original GitHub issueI guess this is in reference to this? https://github.com/spulec/moto/issues/3297
Getting a docker
import error from within moto
.
bash-4.2# pytest -vv test/
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/var/lang/lib/python3.6/site-packages/aws_xray_sdk/core/models/subsegment.py:58: in __call__
meta_processor=None,
/var/lang/lib/python3.6/site-packages/aws_xray_sdk/core/recorder.py:435: in record_subsegment
return_value = wrapped(*args, **kwargs)
[INTERNAL_CODE].py
DelaySeconds=kwargs.get('wait', 0),
/var/lang/lib/python3.6/site-packages/botocore/client.py:357: in _api_call
return self._make_api_call(operation_name, kwargs)
/var/lang/lib/python3.6/site-packages/botocore/client.py:663: in _make_api_call
operation_model, request_dict, request_context)
/var/lang/lib/python3.6/site-packages/botocore/client.py:682: in _make_request
return self._endpoint.make_request(operation_model, request_dict)
/var/lang/lib/python3.6/site-packages/botocore/endpoint.py:102: in make_request
return self._send_request(request_dict, operation_model)
/var/lang/lib/python3.6/site-packages/botocore/endpoint.py:137: in _send_request
success_response, exception):
/var/lang/lib/python3.6/site-packages/botocore/endpoint.py:256: in _needs_retry
caught_exception=caught_exception, request_dict=request_dict)
/var/lang/lib/python3.6/site-packages/botocore/hooks.py:356: in emit
return self._emitter.emit(aliased_event_name, **kwargs)
/var/lang/lib/python3.6/site-packages/botocore/hooks.py:228: in emit
return self._emit(event_name, kwargs)
/var/lang/lib/python3.6/site-packages/botocore/hooks.py:211: in _emit
response = handler(**kwargs)
/var/lang/lib/python3.6/site-packages/botocore/retryhandler.py:183: in __call__
if self._checker(attempts, response, caught_exception):
/var/lang/lib/python3.6/site-packages/botocore/retryhandler.py:251: in __call__
caught_exception)
/var/lang/lib/python3.6/site-packages/botocore/retryhandler.py:269: in _should_retry
return self._checker(attempt_number, response, caught_exception)
/var/lang/lib/python3.6/site-packages/botocore/retryhandler.py:317: in __call__
caught_exception)
/var/lang/lib/python3.6/site-packages/botocore/retryhandler.py:223: in __call__
attempt_number, caught_exception)
/var/lang/lib/python3.6/site-packages/botocore/retryhandler.py:359: in _check_caught_exception
raise caught_exception
/var/lang/lib/python3.6/site-packages/botocore/endpoint.py:197: in _do_get_response
responses = self._event_emitter.emit(event_name, request=request)
/var/lang/lib/python3.6/site-packages/botocore/hooks.py:356: in emit
return self._emitter.emit(aliased_event_name, **kwargs)
/var/lang/lib/python3.6/site-packages/botocore/hooks.py:228: in emit
return self._emit(event_name, kwargs)
/var/lang/lib/python3.6/site-packages/botocore/hooks.py:211: in _emit
response = handler(**kwargs)
/var/lang/lib/python3.6/site-packages/moto/core/models.py:342: in __call__
request, request.url, request.headers
/var/lang/lib/python3.6/site-packages/moto/core/responses.py:202: in dispatch
return cls()._dispatch(*args, **kwargs)
/var/lang/lib/python3.6/site-packages/moto/core/responses.py:312: in _dispatch
return self.call_action()
/var/lang/lib/python3.6/site-packages/moto/core/utils.py:250: in _wrapper
response = f(*args, **kwargs)
/var/lang/lib/python3.6/site-packages/moto/core/utils.py:282: in _wrapper
response = f(*args, **kwargs)
/var/lang/lib/python3.6/site-packages/moto/sqs/responses.py:71: in call_action
status_code, headers, body = super(SQSResponse, self).call_action()
/var/lang/lib/python3.6/site-packages/moto/core/responses.py:397: in call_action
response = method()
/var/lang/lib/python3.6/site-packages/moto/sqs/responses.py:243: in send_message
group_id=message_group_id,
/var/lang/lib/python3.6/site-packages/moto/sqs/models.py:690: in send_message
queue.add_message(message)
/var/lang/lib/python3.6/site-packages/moto/sqs/models.py:483: in add_message
from moto.awslambda import lambda_backends
/var/lang/lib/python3.6/site-packages/moto/awslambda/__init__.py:2: in <module>
from .models import lambda_backends
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
from __future__ import unicode_literals
import base64
import time
from collections import defaultdict
import copy
import datetime
from gzip import GzipFile
> import docker
E ModuleNotFoundError: No module named 'docker'
/var/lang/lib/python3.6/site-packages/moto/awslambda/models.py:10: ModuleNotFoundError
===============================================================================================
bash-4.2# pip freeze | grep moto
moto-ext==1.3.15.45
There is no 1.3.16.0
version from pip
for moto-ext
as suggested in the moto
package referenced above.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8
Top Results From Across the Web
[Fixed] ModuleNotFoundError: No module named 'docker'
How to Fix “ModuleNotFoundError: No module named 'docker'” in PyCharm · Open File > Settings > Project from the PyCharm menu. · Select...
Read more >Failed to import docker or docker-py - No module named docker
The python3-docker module must be installed on the Target machine. I always tried to fix it on my local machine where the runbooks...
Read more >Ansible No module named 'docker' error - Bobcares
Let us see what causes this error. Ansible uses python to deploy changes in the target machine. Because of that any module you...
Read more >No module named docker · Issue #844 - GitHub
To me it looks like that you install docker-py for python 2 and you are trying to import it in python 3. Or...
Read more >Fix ModuleNotFoundError (No Module Named docker) Python ...
In this tutorial I'll show you how to install and import docker package in your python program if you get ModuleNotFoundError no module...
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 Free
Top 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
Hi @chris-erickson, one thing to note that we are in the process of changing the installation. In order to reduce the number of dependencies, you should specify which service you’re using:
moto[s3]==..
ormoto[all]==...
There’s more info in the README.If you manage to create a reproducible example in a public CI, I’d be happy to look into it @antarr, but I haven’t managed to reproduce this myself I’m afraid