Install Ansible for Ubuntu
Install pip
Check pip installed
python3 -m pip -V
Install pip using root
apt install python3-pip
Install ansible
Install ansible using normal user
python3 -m pip install --user ansible
Note: ignore the warning message about .local/bin, the folder will be created and will be in the path after re-login
Upgrade ansible
python3 -m pip install --upgrade --user ansible