Unable to install ERPNext on Ubuntu 18.04

I got the same error message using instally.py script few days ago. Tried the manual method and got errors but got it to work some how fixing them. Most likely the issue is with ansible.

I tried the following and fixed it.

sudo python3 -m pip install --upgrade pip

sudo -H pip install ansible

Always better to install the dependencies manually before using install script in my opinion.