# error in asnible ""msg": "Failed to import the required Python library (botocore or boto3)"

**URL:** <https://forum.ansible.com/t/error-in-asnible-msg-failed-to-import-the-required-python-library-botocore-or-boto3/38652>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [January 15, 2024, 2:47am UTC](https://forum.ansible.com/t/error-in-asnible-msg-failed-to-import-the-required-python-library-botocore-or-boto3/38652 "2024-01-15T02:47:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![user99](https://avatars.discourse-cdn.com/v4/letter/u/a8b319/32.png) [@user99](https://forum.ansible.com/u/user99)\
**Post date:** [January 15, 2024, 2:47am UTC](https://forum.ansible.com/t/error-in-asnible-msg-failed-to-import-the-required-python-library-botocore-or-boto3/38652/1 "2024-01-15T02:47:26Z")

</div>

After upgrading the ansible version and deploying, errors occur. (Ansible ver 2.9.15 → 2.12.10)  
“msg”: “Failed to import the required Python library (botocore or boto3) on sap-sch-api01-a’s Python /usr/bin/python3.8. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible\_python\_interpreter”

“The Ansible version on the Ansible Control node (Ubuntu 20.04) is 2.12, and Python has been upgraded from 3.6.9 to 3.8.10. Similarly, on the Ansible Managed node (Ubuntu 18.04), Python has been upgraded from 3.6.9 to 3.8.0. Despite these upgrades, the same error persists. The boto-related packages on the Ansible Control node are installed as follows:”

ii python3-botocore 1.16.19+repack-1ubuntu0.20.04.1 all Low-level, data-driven core of boto 3 (Python 3)  
root@sap-tools-a:~# ansible --version  
ansible [core 2.12.10]  
config file = /etc/ansible/ansible.cfg  
configured module search path = [‘/root/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]  
ansible python module location = /usr/lib/python3/dist-packages/ansible  
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections  
executable location = /usr/bin/ansible  
python version = 3.8.10 (default, Nov 22 2023, 10:22:35) [GCC 9.4.0]  
jinja version = 2.10.1  
libyaml = True
