# "msg": "No package matching 'python' is available"

**URL:** <https://forum.ansible.com/t/msg-no-package-matching-python-is-available/36960>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [August 8, 2022, 12:39am UTC](https://forum.ansible.com/t/msg-no-package-matching-python-is-available/36960 "2022-08-08T00:39:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![NURUDEEN\_KAMILU](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@NURUDEEN\_KAMILU](https://forum.ansible.com/u/NURUDEEN_KAMILU)\
**Post date:** [August 8, 2022, 12:39am UTC](https://forum.ansible.com/t/msg-no-package-matching-python-is-available/36960/1 "2022-08-08T00:39:11Z")

</div>

Hello,

I tried installing python dependencies on ubuntu using ansible. However, I got this error  
**fatal: [18.157.79.199]: FAILED! =\> {“changed”: false, “msg”: “No package matching ‘python’ is available”}**

Below is a screenshot of my play:

 ![Capture.PNG](https://us1.discourse-cdn.com/ansible/original/2X/7/73c59e41c153cfe58bdffadc16e0663ab6dfb83f.png)

---

<div class="post-metadata">

**Author:** ![dnmvisser](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dnmvisser](https://forum.ansible.com/u/dnmvisser)\
**Post date:** [August 8, 2022, 4:25am UTC](https://forum.ansible.com/t/msg-no-package-matching-python-is-available/36960/2 "2022-08-08T04:25:58Z")

</div>

This is correct. There is no package called python.  
Probably your Ubuntu is recent and the package you want is python3.  
Same for the related packages.

> **(attachments)**
>
> ![Capture.PNG](https://us1.discourse-cdn.com/ansible/original/2X/7/73c59e41c153cfe58bdffadc16e0663ab6dfb83f.png)

---

<div class="post-metadata">

**Author:** ![NURUDEEN\_KAMILU](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@NURUDEEN\_KAMILU](https://forum.ansible.com/u/NURUDEEN_KAMILU)\
**Post date:** [August 8, 2022, 9:11am UTC](https://forum.ansible.com/t/msg-no-package-matching-python-is-available/36960/3 "2022-08-08T09:11:52Z")

</div>

Thank you for this  
I just tried with Ubuntu 18 and also python3 packages.  
Here is the error I have:

**fatal: [3.121.159.145]: FAILED! =\> {“changed”: false, “msg”: “No package matching ‘python3-pip’ is available”}**

---

<div class="post-metadata">

**Author:** ![NURUDEEN\_KAMILU](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@NURUDEEN\_KAMILU](https://forum.ansible.com/u/NURUDEEN_KAMILU)\
**Post date:** [August 8, 2022, 10:19am UTC](https://forum.ansible.com/t/msg-no-package-matching-python-is-available/36960/4 "2022-08-08T10:19:39Z")

</div>

I fixed it by adding **update\_cache** parameter to update the repo first before installing my packages

 ![Capture.PNG](https://us1.discourse-cdn.com/ansible/original/2X/e/ece468c447271979ee19ca612aee23172e8eab53.png)

Thank you for the tips
