# Failed to import the required Python library (Docker SDK for Python: docker (Python \>= 2.7) or docker-py (Python 2.6)) on MacBook-Pro

**URL:** <https://forum.ansible.com/t/failed-to-import-the-required-python-library-docker-sdk-for-python-docker-python-2-7-or-docker-py-python-2-6-on-macbook-pro/33209>\
**Category:** Ansible Project\
**Created:** [June 18, 2020, 9:22am UTC](https://forum.ansible.com/t/failed-to-import-the-required-python-library-docker-sdk-for-python-docker-python-2-7-or-docker-py-python-2-6-on-macbook-pro/33209 "2020-06-18T09:22:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmoullia](https://avatars.discourse-cdn.com/v4/letter/c/a5b964/32.png) [@cmoullia](https://forum.ansible.com/u/cmoullia)\
**Post date:** [June 18, 2020, 9:22am UTC](https://forum.ansible.com/t/failed-to-import-the-required-python-library-docker-sdk-for-python-docker-python-2-7-or-docker-py-python-2-6-on-macbook-pro/33209/1 "2020-06-18T09:22:04Z")

</div>

Hi,

Who can help me to figure out what to do to avoid that the docker\_container module complains that it is not installed

`  
Failed to import the required Python library (Docker SDK for Python: docker (Python \>= 2.7) or docker-py (Python 2.6)) on MacBook-Pro’s Python /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python

`

while it is well installed as site\_package under my virtualenv python3 ?

[https://github.com/ansible-collections/community.general/issues/534](https://github.com/ansible-collections/community.general/issues/534)

Best

Charles

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [June 18, 2020, 4:44pm UTC](https://forum.ansible.com/t/failed-to-import-the-required-python-library-docker-sdk-for-python-docker-python-2-7-or-docker-py-python-2-6-on-macbook-pro/33209/2 "2020-06-18T16:44:01Z")

</div>

the error indicates that the system’s python 2.7 is used

hence you are not using any other venvs and/or pythons
