As long as you have python (not python3) installed via homebrew,I would venture a guess that either
Homebrew is not at the “top” of your PATH environment variable. Fix this within ~/.profile or ~/.bash_profile with the line like: export PATH=/usr/local/bin:/usr/local/sbin:$PATH, or
pip setuptools may be an old version, which can be remedied (and everything else listed & updated) with:
$ pip list --outdated
$ pip install --upgrade pip setuptools
$ pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs pip install -U
I would like to strongly suggest to you (and anyone else reading this thread) to get homebrew onto any Macintosh you plan on using Trellis with.
Updating OS X system components is a no win, zero sum game. At best, if you are lucky, you will likely need to run these upgrade commands again when a new OS update comes out. At worst, you break system functionality and sometimes are almost forced to do global/sudo installs of ansible, npm, etc.
A few years ago, I did not use homebrew and had horrible experiences with OS X updates overwriting multiple ruby packages. I would never wish a forced OS X re-install to anyone working on deadlines
based on your feedback, after a long struggle, Google searching, reading online tutoriels and fiddling in the Terminal, i managed somehow to pass successfully that step 4 of the Trellis install!
i resolved my problem by:
uninstalling Python 3.5 (and Ansible which i had previously installed in it), leaving only the Python version of El Capitan
installing pyenv via homebrew
installing Python 2.7.11 and 3.5.1 via pyenv
setting Python 2.7.11 as global via pyenv
re-installing Ansible via pip in the Python 2.7.11 managed by pyenv
Once everything correctly installed, it just worked (and i learned a few tricks, still a newbie though).
Next step: configuring the WordPress sites, wish me luck
I ran into a similar issue on vagrant up, after I upgraded pip. I upgraded setuptools but was unable to upgrade asnisble. Wrote the ansible upgrade command like this and it worked fine. sudo -H pip install --upgrade ansible --user python
Do you know if the python/pip that you now have is via homebrew? You might want to start with which pip to make sure it is within a homebrew directory (/usr/local/bin/) and then follow the 3 pip list/install/freeze commands from my April 30 post. Separately, you can update all of homebrew with these three commands: brew update; brew upgrade --all; brew doctor
Exception: Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/usr/local/lib/python2.7/site-packages/pip/commands/install.py", line 317, in run prefix=options.prefix_path, File "/usr/local/lib/python2.7/site-packages/pip/req/req_set.py", line 736, in install requirement.uninstall(auto_confirm=True) File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 742, in uninstall paths_to_remove.remove(auto_confirm) File "/usr/local/lib/python2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove renames(path, new_path) File "/usr/local/lib/python2.7/site-packages/pip/utils/__init__.py", line 267, in renames shutil.move(old, new) File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 300, in move rmtree(src) File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 252, in rmtree onerror(os.remove, fullname, sys.exc_info()) File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 250, in rmtree os.remove(fullname) OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/ansible-2.0.2.0-py2.7.egg-info/dependency_links.txt'
Did you copy/paste the whole last line? pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs pip install -U
That last OSError line is a concern as is referencing the OS (and not homebrew) system. I don’t even have a a thought as to a direction to point you in with that one.
ERROR! Unexpected Exception: ‘TaskInclude’ object has no attribute ‘has_triggered’
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
BTW it was working fine a few weeks ago, except for vault encryption.
Saturday news : I removed the Pythons in /libraries and the freeze command ran properly.
Still having the error when doing vagrant up.