# OSX 10.10.3 check uri httplib2 not found

**URL:** <https://forum.ansible.com/t/osx-10-10-3-check-uri-httplib2-not-found/18686>\
**Category:** Ansible Project\
**Created:** [July 6, 2015, 11:54am UTC](https://forum.ansible.com/t/osx-10-10-3-check-uri-httplib2-not-found/18686 "2015-07-06T11:54:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anatol](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@Anatol](https://forum.ansible.com/u/Anatol)\
**Post date:** [July 6, 2015, 11:54am UTC](https://forum.ansible.com/t/osx-10-10-3-check-uri-httplib2-not-found/18686/1 "2015-07-06T11:54:35Z")

</div>

Hi,

I´m trying to test an URL status Code:

`

# Check that you can connect (GET) to a page and it returns a status 200

- uri: url=[http://www.example.com](http://www.example.com)

# Check that a page returns a status 200

- action: uri url=[http://www.example.com](http://www.example.com) return\_content=yes  
register: webpage  
delegate\_to: 127.0.0.1

```auto
    - action: fail
      when: "'illustrative' not in webpage.content"

```

`

I´ve installed httplib2 with

`sudo pip install httplib2`

but it fails with :

`failed: [staging] => {"failed": true} msg: httplib2 is not installed FATAL: all hosts have already failed -- aborting`

I quess ansible is not using the right python path. How can I solve this?

cheers,

– anatol

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [July 6, 2015, 1:04pm UTC](https://forum.ansible.com/t/osx-10-10-3-check-uri-httplib2-not-found/18686/2 "2015-07-06T13:04:31Z")

</div>

set ansible\_python\_interpreter to point to the correct python for that host

---

<div class="post-metadata">

**Author:** ![Anatol](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@Anatol](https://forum.ansible.com/u/Anatol)\
**Post date:** [July 6, 2015, 4:15pm UTC](https://forum.ansible.com/t/osx-10-10-3-check-uri-httplib2-not-found/18686/3 "2015-07-06T16:15:59Z")

</div>

Can you advise me how to do that in OSX?

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [July 6, 2015, 4:27pm UTC](https://forum.ansible.com/t/osx-10-10-3-check-uri-httplib2-not-found/18686/4 "2015-07-06T16:27:45Z")

</div>

not really, I don't use OS X. But plenty of others using OS X should be able to.

---

<div class="post-metadata">

**Author:** ![Anatol](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@Anatol](https://forum.ansible.com/u/Anatol)\
**Post date:** [July 6, 2015, 8:45pm UTC](https://forum.ansible.com/t/osx-10-10-3-check-uri-httplib2-not-found/18686/5 "2015-07-06T20:45:54Z")

</div>

ok thanks, I´m new to python + ansible and would not have asked if google had brought up something useful.
