# absolute import error for centos 5 environment

**URL:** <https://forum.ansible.com/t/absolute-import-error-for-centos-5-environment/26343>\
**Category:** Ansible Project\
**Created:** [December 20, 2017, 1:48pm UTC](https://forum.ansible.com/t/absolute-import-error-for-centos-5-environment/26343 "2017-12-20T13:48:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oguz\_Yarimtepe](https://avatars.discourse-cdn.com/v4/letter/o/d07c76/32.png) [@Oguz\_Yarimtepe](https://forum.ansible.com/u/Oguz_Yarimtepe)\
**Post date:** [December 20, 2017, 1:48pm UTC](https://forum.ansible.com/t/absolute-import-error-for-centos-5-environment/26343/1 "2017-12-20T13:48:28Z")

</div>

Hi,

While i am just testing ping adhoc command for my Centos5 environment below is the error i got

$ ansible all -i tmp3.txt -m ping -u root -k

TESTSRV | FAILED! =\> {  
“changed”: false,  
“failed”: true,  
“module\_stderr”: “”,  
“module\_stdout”: " File "/tmp/ansible\_nEiCUn/ansible\_module\_ping.py", line 8\r\n from **future** import absolute\_import, division, print\_function\r\nSyntaxError: future feature absolute\_import is not defined\r\n",  
“msg”: “MODULE FAILURE”,  
“rc”: 0  
}

✗ pip show ansible  
Name: ansible  
Version: 2.4.1.0  
Summary: Radically simple IT automation  
Home-page: [https://ansible.com/](https://ansible.com/)  
Author: Ansible, Inc.  
Author-email: [info@ansible.com](mailto:info@ansible.com)  
License: GPLv3+  
Location: /Users/foo/ansible-playbooks/venv/lib/python2.7/site-packages  
Requires: jinja2, PyYAML, setuptools, cryptography, paramiko

at the TESTSRV

# cat /etc/redhat-release

CentOS release 5.4 (Final)

# python

Python 2.4.3 (#1, Jan 9 2013, 06:47:03)  
[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2  
Type “help”, “copyright”, “credits” or “license” for more information.

Any idea what is missing at the remote side?

---

<div class="post-metadata">

**Author:** ![tkuratom](https://avatars.discourse-cdn.com/v4/letter/t/b19c9b/32.png) [@tkuratom](https://forum.ansible.com/u/tkuratom)\
**Post date:** [December 20, 2017, 2:59pm UTC](https://forum.ansible.com/t/absolute-import-error-for-centos-5-environment/26343/2 "2017-12-20T14:59:01Z")

</div>

You need a newer version of python or an older version of ansible. Ansible-2.3 was the last release series to support python-2.4 on the managed machines (it still required python-2.6 or greater on the controller but you could manage machines with only python 2.4 installed ).

-Toshio

---

<div class="post-metadata">

**Author:** ![Oguz\_Yarimtepe](https://avatars.discourse-cdn.com/v4/letter/o/d07c76/32.png) [@Oguz\_Yarimtepe](https://forum.ansible.com/u/Oguz_Yarimtepe)\
**Post date:** [December 21, 2017, 1:27pm UTC](https://forum.ansible.com/t/absolute-import-error-for-centos-5-environment/26343/3 "2017-12-21T13:27:55Z")

</div>

Installing Python 2.7 and setting the right path solved the issue. Thank you.
