Anisible pip3 install keeps failing on remote service (No setuptools found in remote host, please install it first)


I am trying to set up my remote servers and have Anisble install required packages. In my playbook.yml everything works fine except when it tries to install requirments.txt only on one remote server. It gives me the following error:

And yes, I do have setuptools install on the remote host.

Not sure why it even needs setuptools when I’m using pip3 to install.

Here is my playbook snippet:

It seems to work fine on the other remote hosts, just this one is having trouble. I’ve tried to uninstall setuptools and reinstall, still no luck. Any ideas?


Ansible needs setuptools to be installed for the version of Python that is being used to run Ansible modules, which, by default, is Python 2. So you need to run pip2 install setuptools or equivalent in order to install setuptools in Python 2.

Leave a Reply