FWIW, I have boto installed globally using pip: sudo pip install boto I can import boto into python without issue, but I get this same error message. I'm using OS X mavericks.
On Friday, August 2, 2013 12:33:50 PM UTC-5, Peter Sankauskas wrote: > > On OSX, there are many ways to use Python, and as you try to overwrite the > default 2.6 that comes with OSX, things can get messy. > > The best way I have found is using brew and pip. You will need to change > your PATH so that brew's install location is before the others, but > essentially, it is: > > $ brew install python > $ pip install boto --upgrade > > Peter Sankauskas > > > > > On Friday, August 2, 2013 9:48:55 AM UTC-7, Dan McKean wrote: >> >> Thanks for your response. >> >> As a practical matter for the environments and admin tools I develop, I >> can't install Python applications and packages globally; they must be run >> in a virtual environment. That's very common usage (our Django and Flask >> apps are virtualenv aware), and I'm a bit disappointed that I can't just >> get Ansible up and running in a virtual environment... it'd be great if >> that were a bit more obvious in the docs, or there's a blog post to point >> this simple usage out. >> >> That being said, Ansible is a breath of fresh air... I've already been >> able to do quite a bit in just a few hours that would've taken me days with >> Chef and Puppet. >> >> Thanks, >> >> Dan >> >> On Friday, August 2, 2013 8:28:12 AM UTC-7, Michael DeHaan wrote: >>> >>> That too, but less to remember if you just install it like an app >>> instead of realizing it's a Python application and treating it special. >>> >>> I use LOTS of apps without knowing what language they are written in. >>> >>> >>> >>> >>> On Fri, Aug 2, 2013 at 11:16 AM, James Martin <[email protected]> wrote: >>> >>>> In your hosts file, set your ansible_python_interpreter= the path of >>>> your python intepreter in your virtual env, it will work. For >>>> example: >>>> >>>> [localhost] >>>> 127.0.0.1 >>>> ansible_python_interpreter=/Users/jmartin/.virtualenvs/ansible-git/bin/python >>>> >>>> On Fri, Aug 2, 2013 at 10:52 AM, Dan McKean <[email protected]> wrote: >>>> > I've been considering Ansible for creating our EC2 instances, and >>>> have run >>>> > into a problem with ansible not finding boto from either the command >>>> line or >>>> > a playbook. >>>> > >>>> > Here's the command line and response; the playbook is similar: >>>> > >>>> > ansible localhost -m ec2 -a "image=ami-0358ce33 instance_type=t1.micro >>>> > keypair=myKeypairName group=default wait=true" >>>> > >>>> > localhost | FAILED >> { >>>> > "failed": true, >>>> > "msg": "boto required for this module" >>>> > } >>>> > >>>> > >>>> > I'm running Ansible from an activated virtualenv. Ansible was >>>> installed >>>> > with pip install ansible, and boto's installed as well in the venv >>>> (as well >>>> > as globally). >>>> > >>>> > If I activate the venv and open a command prompt, I can import boto >>>> without >>>> > any problem, and a boto.connect_ec2() succeeds (there is a ~/.boto >>>> config >>>> > file present). Importing ansible and creating a Runner works >>>> succeeds as >>>> > well. I'm running this on Mac OS X. >>>> > >>>> > Any suggestions on how to fix this? Thanks! >>>> > >>>> > -- Dan >>>> > >>>> > >>>> > -- >>>> > 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]. >>>> > For more options, visit https://groups.google.com/groups/opt_out. >>>> > >>>> > >>>> >>>> -- >>>> 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]. >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>>> >>>> >>> >>> >>> -- >>> Michael DeHaan <[email protected]> >>> CTO, AnsibleWorks, Inc. >>> http://www.ansibleworks.com/ >>> >>> -- 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/9d31e36d-cf93-4de9-98ba-52d31941f3f2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
