No module named ansible.runner

Centos 7
Ansible 1.8
Python 2.7
there are some redundant entries in my environment path but I don’t see how that would cause this problem

PATH is /usr/local/bin:/usr/local/sbin:/usr/bin:/usr/bin:/usr/sbin:/bin:/sbin:/home/username/.local/bin:/home/username/bin:/etc/ansible:/etc/ansible/bin:/usr/bin/python

Every time I try to run ansible I get

Traceback (most recent call last):
File “/etc/ansible/bin/ansible”, line 25, in
from ansible.runner import Runner
ImportError: No module named ansible.runner

I’m not sure if this is a problem with python or ansible but it seems like something very basic. I’ve dug around the internet and all I found was http://michaelheap.com/ansible-importerror-no-module-named-ansible-playbook/

Any tips would be appreciated.

I've had this come up before. The solution for me was to check then fix the permissions of the Python libraries/packages. Which were nonexecutable when the error was present. Think it may have to do with customized umask settings.

Did this get resolved by doing this? I have python 2.7 with ubuntu 14.04 and have just come up against this error.

I can’t say for sure but I do remember a python guy helping me modify some file permissions so it certainly could have worked. Sorry I can’t be more certain.

Hi, i am facing this same error. Were you able to resolve it?

ansible.runner was removed in 2.0, it only applies to older versions
of Ansible. The docs show how to use the new API
http://docs.ansible.com/ansible/dev_guide/developing_api.html#python-api-2-0