# Getting error "No python interpreters found for host" when running ansible-playbook

**URL:** <https://forum.ansible.com/t/getting-error-no-python-interpreters-found-for-host-when-running-ansible-playbook/41434>\
**Category:** Get Help\
**Created:** [March 31, 2025, 2:47pm UTC](https://forum.ansible.com/t/getting-error-no-python-interpreters-found-for-host-when-running-ansible-playbook/41434 "2025-03-31T14:47:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrSnrub](https://avatars.discourse-cdn.com/v4/letter/m/7ea924/32.png) [@MrSnrub](https://forum.ansible.com/u/MrSnrub)\
**Post date:** [March 31, 2025, 2:47pm UTC](https://forum.ansible.com/t/getting-error-no-python-interpreters-found-for-host-when-running-ansible-playbook/41434/1 "2025-03-31T14:47:11Z")

</div>

Hi I just installed ansible and am trying to run it, but it is returning an error regarding python on my managed node. It says “No python interpreters found for host (hostname) (tried [‘python3.12’, ‘python3.11’, ‘python3.10’, ‘python3.9’, ‘python3.8’, ‘python3.7’, ‘/usr/bin/python3’, ‘python3’]”. I know that the host does have python, but it is python2. If I go to the host machine and type “python --version” it says “Python 2.7.5”. Is there a way for ansible to search for Python version 2?

---

<div class="post-metadata">

**Author:** ![Lyle\_McKarns](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/lyle_mckarns/32/8142_2.png) [@Lyle\_McKarns](https://forum.ansible.com/u/Lyle_McKarns)\
**Post date:** [March 31, 2025, 3:05pm UTC](https://forum.ansible.com/t/getting-error-no-python-interpreters-found-for-host-when-running-ansible-playbook/41434/2 "2025-03-31T15:05:32Z")

</div>

This [support matrix](https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix) shows the versions of `ansible-core` that still support python2.7. If you’re trying to manage nodes that only support python 2.7, you’ll need to ensure you’re running `ansible-core` 2.16 or older.

According to that matrix, 2.16 goes EoL in May of 2025, and is therefore unlikely to be a viable solution in the long run.

---

<div class="post-metadata">

**Author:** ![MrSnrub](https://avatars.discourse-cdn.com/v4/letter/m/7ea924/32.png) [@MrSnrub](https://forum.ansible.com/u/MrSnrub)\
**Post date:** [March 31, 2025, 4:15pm UTC](https://forum.ansible.com/t/getting-error-no-python-interpreters-found-for-host-when-running-ansible-playbook/41434/3 "2025-03-31T16:15:43Z")

</div>

how do i downgrade to that specific version of ansible-core?

---

<div class="post-metadata">

**Author:** ![Lyle\_McKarns](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/lyle_mckarns/32/8142_2.png) [@Lyle\_McKarns](https://forum.ansible.com/u/Lyle_McKarns)\
**Post date:** [March 31, 2025, 5:49pm UTC](https://forum.ansible.com/t/getting-error-no-python-interpreters-found-for-host-when-running-ansible-playbook/41434/4 "2025-03-31T17:49:49Z")

</div>

That depends on how you installed ansible to begin with. If you used pip, I believe you can do something like `pip install ansible-core=2.16`

---

<div class="post-metadata">

**Author:** ![MrSnrub](https://avatars.discourse-cdn.com/v4/letter/m/7ea924/32.png) [@MrSnrub](https://forum.ansible.com/u/MrSnrub)\
**Post date:** [March 31, 2025, 7:20pm UTC](https://forum.ansible.com/t/getting-error-no-python-interpreters-found-for-host-when-running-ansible-playbook/41434/5 "2025-03-31T19:20:22Z")

</div>

K, I’m just gonna remove everything and start from scratch. How do I install version 2.16 of ansible?

---

<div class="post-metadata">

**Author:** ![MrSnrub](https://avatars.discourse-cdn.com/v4/letter/m/7ea924/32.png) [@MrSnrub](https://forum.ansible.com/u/MrSnrub)\
**Post date:** [March 31, 2025, 7:21pm UTC](https://forum.ansible.com/t/getting-error-no-python-interpreters-found-for-host-when-running-ansible-playbook/41434/6 "2025-03-31T19:21:02Z")

</div>

I should add: this is on a WSL Ubuntu box.

---

<div class="post-metadata">

**Author:** ![Lyle\_McKarns](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/lyle_mckarns/32/8142_2.png) [@Lyle\_McKarns](https://forum.ansible.com/u/Lyle_McKarns)\
**Post date:** [March 31, 2025, 7:30pm UTC](https://forum.ansible.com/t/getting-error-no-python-interpreters-found-for-host-when-running-ansible-playbook/41434/7 "2025-03-31T19:30:19Z")

</div>

The following will create a `venv` to install `ansible-core 2.16` (tested on WSL)

```auto
mkdir tmp
python -m venv tmp
cd tmp/
source bin/activate
pip install ansible-core==2.16

```
