httplib2 is not installed in fresh venv

456 views
Skip to first unread message

David Neudorfer

unread,
Sep 24, 2014, 2:58:56 PM9/24/14
to ansible...@googlegroups.com
Inside a fresh virtualenv I installed httplib and ansible and run the following command but ansible complains that httplib2 isn't installed. Any suggestions how I get this working? Thanks for the help!

(httplib2_test)[root@v-hegemon hegemon]# ansible -i /opt/wp/app/hegemon/ansible/hosts.vagrant localhost -m uri -a "url=google.com status_code=200 return_content=yes"
localhost
| FAILED >> {
   
"failed": true,
   
"msg": "httplib2 is not installed"
}

(httplib2_test)[root@v-hegemon hegemon]# pip freeze
Jinja2==2.7.3
MarkupSafe==0.23
PyYAML==3.11
ansible
==1.7.1
ecdsa
==0.11
httplib2
==0.9
paramiko
==1.15.1
pycrypto
==2.6.1
wsgiref
==0.1.2

Michael DeHaan

unread,
Sep 24, 2014, 3:01:13 PM9/24/14
to ansible...@googlegroups.com
You'll need to set the inventory variable ansible_python_interpreter to point at the python inside your virtualenv.

Ansible is still trying to use system python for executing modules, basically.



--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/9c9344b6-f9fb-4e99-bef8-630dc33aa2aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Neudorfer

unread,
Sep 24, 2014, 3:10:29 PM9/24/14
to ansible...@googlegroups.com
Thanks Michael! Its so easy to forget that. Also for posterity and anyone else working on the same issue 
yum install python-httplib2

works as well.
Reply all
Reply to author
Forward
0 new messages