EC2 boto issue

I’m having an issue using the ec2 module with ansible, version 1.4.4 on OSX. I keep getting

msg: boto required for this module

I am not using virutalenv, python was installed with brew and both ansible and boto were installed with pip. I have removed and reinstalled each to be sure.

Anyone know what might be wrong?

thanks

E.

Check if boto was installed to the site-packages for the default python in your path:

python -c "import boto ; print boto.Version"

Also figure out where site packages is for your default python ...

python -c "import site; print site.getsitepackages()"
python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"

Make sure there's a boto subdir in one of those directories.

If you can't find boto, the default python in your path is probably not the one brew is using.

Thanks for the reply, your commands have really helped me understand the issue

Seems I have two versions of python installed, one from homebrew in the path /usr/local/bin/python and a default one in /usr/bin/python

When i run everything at the command line e.g. to install boto it uses the brew version as its in my path first. I’m guessing that ansible’s path is looking at /usr/bin/ first and finds the version there.

adding this in the host file gets it to work

Adding the following to the hosts file made it work,

[localhost]
127.0.0.1 ansible_python_interpreter=/usr/local/bin/python

Now i need to find out how to replace the default install with the brew managed one.

Thanks for helping,

Earn.