# Ansible 2.0 Upgrade Appears to Succeed But Fails?

**URL:** <https://forum.ansible.com/t/ansible-2-0-upgrade-appears-to-succeed-but-fails/20180>\
**Category:** Ansible Project\
**Created:** [January 12, 2016, 4:24pm UTC](https://forum.ansible.com/t/ansible-2-0-upgrade-appears-to-succeed-but-fails/20180 "2016-01-12T16:24:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_Levitt](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@Jason\_Levitt](https://forum.ansible.com/u/Jason_Levitt)\
**Post date:** [January 12, 2016, 4:24pm UTC](https://forum.ansible.com/t/ansible-2-0-upgrade-appears-to-succeed-but-fails/20180/1 "2016-01-12T16:24:03Z")

</div>

I ran my usual Ansible upgrade for Ansible on my MacOSX (v10.11) laptop and it appeared to upgrade me:

`$ sudo -H pip install --upgrade ansible --user python Password: Collecting ansible Downloading ansible-2.0.0.0.tar.gz (1.5MB) 100% |################################| 1.5MB 172kB/s Requirement already up-to-date: python in /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload Requirement already up-to-date: paramiko in /Library/Python/2.7/site-packages (from ansible) Requirement already up-to-date: jinja2 in /Library/Python/2.7/site-packages (from ansible) Requirement already up-to-date: PyYAML in /Library/Python/2.7/site-packages (from ansible) Collecting setuptools (from ansible) Using cached setuptools-19.2-py2.py3-none-any.whl Requirement already up-to-date: pycrypto>=2.6 in /Library/Python/2.7/site-packages (from ansible) Requirement already up-to-date: ecdsa>=0.11 in /Library/Python/2.7/site-packages (from paramiko->ansible) Requirement already up-to-date: MarkupSafe in /Library/Python/2.7/site-packages (from jinja2->ansible) Installing collected packages: setuptools, ansible Running setup.py install for ansible Successfully installed ansible-2.0.0.0 setuptools-1.1.6 $`

However, when I type this at the command line, I’m still on v1.94:

`$ ansible --version ansible 1.9.4 configured module search path = None $`

Anyone know what’s going on here?

J

---

<div class="post-metadata">

**Author:** ![Allan\_Lewis](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@Allan\_Lewis](https://forum.ansible.com/u/Allan_Lewis)\
**Post date:** [January 12, 2016, 5:06pm UTC](https://forum.ansible.com/t/ansible-2-0-upgrade-appears-to-succeed-but-fails/20180/2 "2016-01-12T17:06:32Z")

</div>

Do `which -a ansible`: are you using the Ansible you installed (probably to `~/.local.bin`) or the system Ansible, installed through your package manager (probably in `/usr/bin`)? If the latter, you need to add Pip’s user-bin to your PATH.

---

<div class="post-metadata">

**Author:** ![Jason\_Levitt](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@Jason\_Levitt](https://forum.ansible.com/u/Jason_Levitt)\
**Post date:** [January 12, 2016, 5:38pm UTC](https://forum.ansible.com/t/ansible-2-0-upgrade-appears-to-succeed-but-fails/20180/3 "2016-01-12T17:38:20Z")

</div>

Not sure how to interpret these. It doesn’t seem to me like the installation worked…(?)

`$ which -a ansible /usr/local/bin/ansible /usr/local/bin/ansible $`

`$ sudo find / -name ansible -print /Library/Python/2.7/site-packages/ansible /private/var/root/Library/Python/2.7/bin/ansible /private/var/root/Library/Python/2.7/lib/python/site-packages/ansible /usr/local/bin/ansible /usr/local/lib/python2.7/site-packages/ansible $`

---

<div class="post-metadata">

**Author:** ![Jason\_Levitt](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@Jason\_Levitt](https://forum.ansible.com/u/Jason_Levitt)\
**Post date:** [January 12, 2016, 7:47pm UTC](https://forum.ansible.com/t/ansible-2-0-upgrade-appears-to-succeed-but-fails/20180/4 "2016-01-12T19:47:49Z")

</div>

Interesting. If I use sudo’s -H flag, it tries to uninstall Ansible 2.0:

`$ sudo -H pip uninstall ansible Uninstalling ansible-2.0.0.0: /private/var/root/Library/Python/2.7/bin/ansible /private/var/root/Library/Python/2.7/bin/ansible-doc ... ...`

But if I don’t, it tries to uninstall ansible 1.9.4:

`$ sudo pip uninstall ansible The directory '/Users/myuser/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Uninstalling ansible-1.9.4: /Library/Python/2.7/site-packages/ansible-1.9.4-py2.7.egg-info /Library/Python/2.7/site-packages/ansible/ __init__.py .... .....`

-J

---

<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:** [January 12, 2016, 7:49pm UTC](https://forum.ansible.com/t/ansible-2-0-upgrade-appears-to-succeed-but-fails/20180/5 "2016-01-12T19:49:46Z")

</div>

if you are on OS X there is an issue with the 'protected filesystem'  
which does not allow sudo + pip --upgrade to work. you need to  
uninstall and reinstall Ansible.

---

<div class="post-metadata">

**Author:** ![Jason\_Levitt](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@Jason\_Levitt](https://forum.ansible.com/u/Jason_Levitt)\
**Post date:** [January 12, 2016, 7:50pm UTC](https://forum.ansible.com/t/ansible-2-0-upgrade-appears-to-succeed-but-fails/20180/6 "2016-01-12T19:50:23Z")

</div>

So I uninstalled both of them (see below), and then ran my original install command again and now  
Ansible 2.0 is installed.

J

---

<div class="post-metadata">

**Author:** ![David\_Njuki](https://avatars.discourse-cdn.com/v4/letter/d/f07891/32.png) [@David\_Njuki](https://forum.ansible.com/u/David_Njuki)\
**Post date:** [January 13, 2016, 6:34am UTC](https://forum.ansible.com/t/ansible-2-0-upgrade-appears-to-succeed-but-fails/20180/7 "2016-01-13T06:34:43Z")

</div>

On OS X El Capitan, I used “–ignore-installed” when upgrading so as to overcome the permissions issue.

$ sudo pip install ansible --upgrade --ignore-installed
