# cant install on os x 10.11

**URL:** <https://forum.ansible.com/t/cant-install-on-os-x-10-11/19722>\
**Category:** Ansible Project\
**Created:** [November 10, 2015, 9:20am UTC](https://forum.ansible.com/t/cant-install-on-os-x-10-11/19722 "2015-11-10T09:20:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pixel\_fairy](https://avatars.discourse-cdn.com/v4/letter/p/6f9a4e/32.png) [@pixel\_fairy](https://forum.ansible.com/u/pixel_fairy)\
**Post date:** [November 10, 2015, 9:20am UTC](https://forum.ansible.com/t/cant-install-on-os-x-10-11/19722/1 "2015-11-10T09:20:09Z")

</div>

easy install pip worked. but when trying to install ansible, this happens. it looks like a connection error. maybe intermittent failure?

`  
$ sudo pip install ansible  
Downloading/unpacking ansible  
Cleaning up…  
Exception:  
Traceback (most recent call last):  
File “/Library/Python/2.7/site-packages/pip-1.5.4-py2.7.egg/pip/basecommand.py”, line 122, in main  
status = self.run(options, args)  
File “/Library/Python/2.7/site-packages/pip-1.5.4-py2.7.egg/pip/commands/install.py”, line 278, in run  
requirement\_set.prepare\_files(finder, force\_root\_egg\_info=self.bundle, bundle=self.bundle)  
File “/Library/Python/2.7/site-packages/pip-1.5.4-py2.7.egg/pip/req.py”, line 1177, in prepare\_files  
url = finder.find\_requirement(req\_to\_install, upgrade=self.upgrade)  
File “/Library/Python/2.7/site-packages/pip-1.5.4-py2.7.egg/pip/index.py”, line 194, in find\_requirement  
page = self.\_get\_page(main\_index\_url, req)  
File “/Library/Python/2.7/site-packages/pip-1.5.4-py2.7.egg/pip/index.py”, line 568, in \_get\_page  
session=self.session,  
File “/Library/Python/2.7/site-packages/pip-1.5.4-py2.7.egg/pip/index.py”, line 694, in get\_page  
req, link, “connection error: %s” % exc, url,  
TypeError: **str** returned non-string (type Error)

Storing debug log for failure in /Users/pixel/Library/Logs/pip.log

`

---

<div class="post-metadata">

**Author:** ![tinyzais](https://avatars.discourse-cdn.com/v4/letter/t/7c8e57/32.png) [@tinyzais](https://forum.ansible.com/u/tinyzais)\
**Post date:** [November 10, 2015, 10:17am UTC](https://forum.ansible.com/t/cant-install-on-os-x-10-11/19722/2 "2015-11-10T10:17:15Z")

</div>

I believe recommended way is to use homebrew.

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [November 10, 2015, 1:08pm UTC](https://forum.ansible.com/t/cant-install-on-os-x-10-11/19722/3 "2015-11-10T13:08:01Z")

</div>

Based on that error it looks like pip is failing to locate dependencies while communicating with pypi with an un caught exception.

This isn’t really Ansible related. You might want to try upgrading pip and try installing Ansible again.

sudo pip install -U pip  
sudo pip install -U ansible

---

<div class="post-metadata">

**Author:** ![pixel\_fairy](https://avatars.discourse-cdn.com/v4/letter/p/6f9a4e/32.png) [@pixel\_fairy](https://forum.ansible.com/u/pixel_fairy)\
**Post date:** [November 10, 2015, 1:50pm UTC](https://forum.ansible.com/t/cant-install-on-os-x-10-11/19722/4 "2015-11-10T13:50:07Z")

</div>

same error. i think this ones on apple. already contacted their developer forum. will gather more data and send them a bug report.

in the mean time, running it in a vm. been thinking of switching this mac over to linux anyway.

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [November 10, 2015, 5:09pm UTC](https://forum.ansible.com/t/cant-install-on-os-x-10-11/19722/5 "2015-11-10T17:09:31Z")

</div>

Homebrew is _not_ the recommended way to install Ansible. The recommended way to install Ansible on Mac OS, is via pip.

We specifically removed those installation instructions, as homebrew causes other issues that are much more complicated to resolve.

---

<div class="post-metadata">

**Author:** ![pixel\_fairy](https://avatars.discourse-cdn.com/v4/letter/p/6f9a4e/32.png) [@pixel\_fairy](https://forum.ansible.com/u/pixel_fairy)\
**Post date:** [November 11, 2015, 11:01am UTC](https://forum.ansible.com/t/cant-install-on-os-x-10-11/19722/6 "2015-11-11T11:01:23Z")

</div>

I ended up using homebrew to install a working python, and then was able to use pip to install ansible. So, homebrew did end up part of the solution.

Ill switch back to system python when apple fixes it.
