# httplib2 is not installed in fresh venv

**URL:** <https://forum.ansible.com/t/httplib2-is-not-installed-in-fresh-venv/16325>\
**Category:** Ansible Project\
**Created:** [September 24, 2014, 6:58pm UTC](https://forum.ansible.com/t/httplib2-is-not-installed-in-fresh-venv/16325 "2014-09-24T18:58:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![david.neudorfer](https://avatars.discourse-cdn.com/v4/letter/d/b38774/32.png) [@david.neudorfer](https://forum.ansible.com/u/david.neudorfer)\
**Post date:** [September 24, 2014, 6:58pm UTC](https://forum.ansible.com/t/httplib2-is-not-installed-in-fresh-venv/16325/1 "2014-09-24T18:58:56Z")

</div>

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](http://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  
`

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [September 24, 2014, 7:01pm UTC](https://forum.ansible.com/t/httplib2-is-not-installed-in-fresh-venv/16325/2 "2014-09-24T19:01:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![david.neudorfer](https://avatars.discourse-cdn.com/v4/letter/d/b38774/32.png) [@david.neudorfer](https://forum.ansible.com/u/david.neudorfer)\
**Post date:** [September 24, 2014, 7:10pm UTC](https://forum.ansible.com/t/httplib2-is-not-installed-in-fresh-venv/16325/3 "2014-09-24T19:10:28Z")

</div>

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.
