# Unable to use yum on target RHEL 8.6 host that has python3.12

**URL:** <https://forum.ansible.com/t/unable-to-use-yum-on-target-rhel-8-6-host-that-has-python3-12/41162>\
**Category:** Get Help\
**Tags:** rhel\
**Created:** [March 20, 2025, 3:09pm UTC](https://forum.ansible.com/t/unable-to-use-yum-on-target-rhel-8-6-host-that-has-python3-12/41162 "2025-03-20T15:09:50Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![mseto2](https://avatars.discourse-cdn.com/v4/letter/m/6bbea6/32.png) [@mseto2](https://forum.ansible.com/u/mseto2)\
**Post date:** [March 20, 2025, 3:09pm UTC](https://forum.ansible.com/t/unable-to-use-yum-on-target-rhel-8-6-host-that-has-python3-12/41162/1 "2025-03-20T15:09:50Z")

</div>

I am trying to use ansible (core 2.17.7) to run a playbook on a target RHEL 8.6 host. I know RHEL 8.6 ships with python3.6, but I have already compiled and built python3.12 on the target host, as well as updated the symlinks

I can run python --version on the target host and it does return Python 3.12.8

However, when I try running my playbook (even when specifying the ‘ansible\_python\_interpreter: /usr/bin/python’ var in the playbook), it keeps returning with the same error.

```auto
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: SyntaxError: future feature annotations is not defined
fatal: [10.17.12.133]: FAILED! => {"changed": false, "module_stderr": "Shared connection to 10.17.12.133 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File \"<stdin>\", line 12, in <module>\r\n File \"<frozen importlib._bootstrap>\", line 971, in _find_and_load\r\n File \"<frozen importlib._bootstrap>\", line 951, in _find_and_load_unlocked\r\n File \"<frozen importlib._bootstrap>\", line 894, in _find_spec\r\n File \"<frozen importlib._bootstrap_external>\", line 1157, in find_spec\r\n File \"<frozen importlib._bootstrap_external>\", line 1131, in _get_spec\r\n File \"<frozen importlib._bootstrap_external>\", line 1112, in _legacy_get_spec\r\n File \"<frozen importlib._bootstrap>\", line 441, in spec_from_loader\r\n File \"<frozen importlib._bootstrap_external>\", line 544, in spec_from_file_location\r\n File \"/tmp/ansible_ansible.legacy.dnf_payload_xzwufs6b/ansible_ansible.legacy.dnf_payload.zip/ansible/module_utils/basic.py\", line 5\r\nSyntaxError: future feature annotations is not defined\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

```

Any help would be appreciated!

---

_[View the full topic](https://forum.ansible.com/t/unable-to-use-yum-on-target-rhel-8-6-host-that-has-python3-12/41162)._
