# EC2 boto issue

**URL:** <https://forum.ansible.com/t/ec2-boto-issue/14458>\
**Category:** Ansible Project\
**Created:** [January 29, 2014, 10:47pm UTC](https://forum.ansible.com/t/ec2-boto-issue/14458 "2014-01-29T22:47:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![esteevio](https://avatars.discourse-cdn.com/v4/letter/e/db5fbb/32.png) [@esteevio](https://forum.ansible.com/u/esteevio)\
**Post date:** [January 29, 2014, 10:47pm UTC](https://forum.ansible.com/t/ec2-boto-issue/14458/1 "2014-01-29T22:47:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tannerjc](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tannerjc/32/985_2.png) [@tannerjc](https://forum.ansible.com/u/tannerjc)\
**Post date:** [January 30, 2014, 7:07pm UTC](https://forum.ansible.com/t/ec2-boto-issue/14458/2 "2014-01-30T19:07:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![esteevio](https://avatars.discourse-cdn.com/v4/letter/e/db5fbb/32.png) [@esteevio](https://forum.ansible.com/u/esteevio)\
**Post date:** [January 30, 2014, 8:19pm UTC](https://forum.ansible.com/t/ec2-boto-issue/14458/3 "2014-01-30T20:19:36Z")

</div>

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.
