Thank you – I think the deal was that amazon linux2 comes with several 
versions of Python3 that you can install and I had to pick a particular one 
that has pip3. This is just a guess as I don't know much about how linux 
distros work. Anyway using these two commands in this order worked for me:

sudo yum -y install python3 python3-pip 
sudo pip3 install ansible 


On Wednesday, March 13, 2019 at 11:53:13 AM UTC-7, Dick Visser wrote:
>
>
>
> On Wed, 13 Mar 2019 at 17:41, <[email protected] <javascript:>> wrote:
>
>> Thank you for the reply - ansible was not already installed and I 
>> installed it with pip - here are the commands I used:
>>
>> sudo yum install python3
>> sudo easy_install pip 
>> sudo pip3 install ansible
>>
>
> Yum installing python3 in the first step will automagically pull in the 
> right pip3 (as /usr/bin/pip3, which uses python3).
> But then in the second step you issue easy_install, which overwrites 
> /usr/bin/pip3 with a version that uses python2.
> I think this causes the ansible installation step to also use python2.
>
> So the fix is to simply leave that second step out - on a new instance.
> If you don't want to instantiate, I think this should get you sorted (not 
> tested):
>
> sudo pip uninstall ansible
> sudo pip uninstall pip
> sudo yum remove python3
> sudo yum install python3
> sudo pip3 install ansible
>
>
> Dick
>
>
>  
> -- 
> Dick Visser
> Trust & Identity Service Operations Manager
> GÉANT
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/6a89cf4f-55b8-4e78-877f-43c85a1c8eb5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to