# AWX task failure for python netaddr

**URL:** <https://forum.ansible.com/t/awx-task-failure-for-python-netaddr/36366>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [February 24, 2022, 4:22pm UTC](https://forum.ansible.com/t/awx-task-failure-for-python-netaddr/36366 "2022-02-24T16:22:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Albert\_Short](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@Albert\_Short](https://forum.ansible.com/u/Albert_Short)\
**Post date:** [February 24, 2022, 4:22pm UTC](https://forum.ansible.com/t/awx-task-failure-for-python-netaddr/36366/1 "2022-02-24T16:22:30Z")

</div>

All,

this is the message I execute a task that requires ipaddr filter

{  
“msg”: “The ipaddr filter requires python’s netaddr be installed on the ansible controller”,  
“\_ansible\_no\_log”: false  
}

I know that netaddr is installed because I ran a ‘pip list’ command before the failure. See below.

The play book works from the ansible controller i have developed on, both in Debian & Centos versions.  
I am using AWX v19.2.2  
Playbooks use a remote node to execute against.

I even have a task to install netaddr which says it is successful but i see this message

Not sure if the PATH comment is something i need to change in my role to make it work on AWX.

{  
“changed”: true,  
“cmd”: [  
“/usr/local/bin/pip3”,  
“install”,  
“netaddr”  
],  
“name”: [  
“netaddr”  
],  
“version”: null,  
“state”: “present”,  
“requirements”: null,  
“virtualenv”: null,  
“stdout”: “Defaulting to user installation because normal site-packages is not writeable\nCollecting netaddr\n Downloading netaddr-0.8.0-py2.py3-none-any.whl (1.9 MB)\nInstalling collected packages: netaddr\nSuccessfully installed netaddr-0.8.0\n”,  
“stderr”: " WARNING: The script netaddr is installed in ‘/home/runner/.local/bin’ which is not on PATH.\n Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\nWARNING: You are using pip version 21.1.3; however, version 22.0.3 is available.\nYou should consider upgrading via the ‘/usr/bin/python3 -m pip install --upgrade pip’ command.\n",  
“invocation”: {  
“module\_args”: {  
“name”: [  
“netaddr”  
],  
“state”: “present”,  
“virtualenv\_site\_packages”: false,  
“virtualenv\_command”: “virtualenv”,  
“editable”: false,  
“version”: null,  
“requirements”: null,  
“virtualenv”: null,  
“virtualenv\_python”: null,  
“extra\_args”: null,  
“chdir”: null,  
“executable”: null,  
“umask”: null  
}  
},  
“stdout\_lines”: [  
“Defaulting to user installation because normal site-packages is not writeable”,  
“Collecting netaddr”,  
" Downloading netaddr-0.8.0-py2.py3-none-any.whl (1.9 MB)“,  
“Installing collected packages: netaddr”,  
“Successfully installed netaddr-0.8.0”  
],  
“stderr\_lines”: [  
" WARNING: The script netaddr is installed in ‘/home/runner/.local/bin’ which is not on PATH.”,  
" Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.",  
“WARNING: You are using pip version 21.1.3; however, version 22.0.3 is available.”,  
“You should consider upgrading via the ‘/usr/bin/python3 -m pip install --upgrade pip’ command.”  
],  
“\_ansible\_no\_log”: false  
}

---

<div class="post-metadata">

**Author:** ![Seth\_Foster](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@Seth\_Foster](https://forum.ansible.com/u/Seth_Foster)\
**Post date:** [March 2, 2022, 9:03pm UTC](https://forum.ansible.com/t/awx-task-failure-for-python-netaddr/36366/2 "2022-03-02T21:03:25Z")

</div>

Hi!

If that pip list from the control plane node? All jobs now run in execution environments [https://docs.ansible.com/automation-controller/latest/html/userguide/execution\_environments.html](https://docs.ansible.com/automation-controller/latest/html/userguide/execution_environments.html)

The default execution environment is pulled from [quay.io/awx/awx-ee](http://quay.io/awx/awx-ee). When you launch a job via AWX, podman will create a fresh container from that image, your playbook is mounted into that container and ansible-runner will run the plays.

When I do a pip list on that awx-ee container, I see the following (truncated)

munch 2.5.0  
ncclient 0.6.12  
netifaces 0.11.0  
nsx-policy-python-sdk 3.1.3.2.0  
nsx-python-sdk 3.1.3.2.0  
nsx-vmc-aws-integration-python-sdk 3.1.3.2.0  
nsx-vmc-policy-python-sdk 3.1.3.2.0  
ntlm-auth 1.5.0  
oauthlib 3.2.0

You may need to build your own execution environment [https://ansible-builder.readthedocs.io/en/stable/](https://ansible-builder.readthedocs.io/en/stable/)

Let me know if that is helpful.

Seth
