My Ansible playbooks are failing with this message:
fatal: [localhost]: FAILED! => {“changed”: false, “msg”: “Python modules "botocore" or "boto3" are missing, please install both”}
But boto3 and botocore ARE installed:
kauer@kt:~/dev/ansible/bc-ansible-automation/projects/adfs$ sudo -H pip install boto3
Requirement already satisfied: boto3 in /usr/local/lib/python3.5/dist-packages (1.8.4)
Requirement already satisfied: botocore<1.12.0,>=1.11.4 in /usr/local/lib/python3.5/dist-packages (from boto3) (1.11.4)
Requirement already satisfied: s3transfer<0.2.0,>=0.1.10 in /usr/local/lib/python3.5/dist-packages (from boto3) (0.1.13)
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /usr/local/lib/python3.5/dist-packages (from boto3) (0.9.3)
Requirement already satisfied: urllib3<1.24,>=1.20 in /usr/local/lib/python3.5/dist-packages (from botocore<1.12.0,>=1.11.4->boto3) (1.23)
Requirement already satisfied: docutils>=0.10 in /usr/local/lib/python3.5/dist-packages (from botocore<1.12.0,>=1.11.4->boto3) (0.13.1)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1; python_version >= “2.7” in /usr/local/lib/python3.5/dist-packages (from botocore<1.12.0,>=1.11.4->boto3) (2.6.0)
Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil<3.0.0,>=2.1; python_version >= “2.7”->botocore<1.12.0,>=1.11.4->boto3) (1.10.0)
kauer@kt:~/dev/ansible/bc-ansible-automation/projects/adfs$ sudo -H pip install botocore
Requirement already satisfied: botocore in /usr/local/lib/python3.5/dist-packages (1.11.4)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1; python_version >= “2.7” in /usr/local/lib/python3.5/dist-packages (from botocore) (2.6.0)
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /usr/local/lib/python3.5/dist-packages (from botocore) (0.9.3)
Requirement already satisfied: docutils>=0.10 in /usr/local/lib/python3.5/dist-packages (from botocore) (0.13.1)
Requirement already satisfied: urllib3<1.24,>=1.20 in /usr/local/lib/python3.5/dist-packages (from botocore) (1.23)
Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil<3.0.0,>=2.1; python_version >= “2.7”->botocore) (1.10.0)
I get the same output without the -H option to sudo too.
I can see boto3 in these two locations on my system:
/usr/local/lib/python2.7/dist-packages/boto3
/usr/local/lib/python3.5/dist-packages/boto3
Is it some sort of path thing? I cannot figure out what’s changed.
Regards, K.