It doens't work because of permission problem with the new OS EI Capitan.
Probably need to use some other ways to install it.
You can install it in the system python with the following command:
sudo -H pip install awscli --upgrade --ignore-installed six
Otherwise, you may install it in a virtualenv or brew python, neither of which have the same issues. There has been some discussion of this in #1522
Still an issue for me with python 2.7.10
on OS X 10.11.6
:
Uninstalling six:
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-1.2.1-py2.7.egg/pip/basecommand.py", line 107, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-1.2.1-py2.7.egg/pip/commands/install.py", line 261, in run
requirement_set.install(install_options, global_options)
File "/Library/Python/2.7/site-packages/pip-1.2.1-py2.7.egg/pip/req.py", line 1162, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Python/2.7/site-packages/pip-1.2.1-py2.7.egg/pip/req.py", line 495, in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Python/2.7/site-packages/pip-1.2.1-py2.7.egg/pip/req.py", line 1492, in remove
renames(path, new_path)
File "/Library/Python/2.7/site-packages/pip-1.2.1-py2.7.egg/pip/util.py", line 273, in renames
shutil.move(old, new)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
copy2(src, real_dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
copystat(src, dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/tmp/pip-KBgdZ3-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
Using pip install --user awscli
worked for me though.
[sudo] pip install awscli --ignore-installed six
works fine for me, but doesn't it miss the point, since it will end up with not the right version of six? I think it would be ideal if the tool doesn't require a newer six to just accept the version that's installed with OS X, or, if not, come up with a cleaner workaround. I'm sure there are quite a lot of folks who want to run aws CLI from OS X, and while it's easy to google the fix, it's a pain, and I seem to have to do it every time I need to install the tool.
And ps - This is still an issue with the newest version of OS X.
@wyardley
'[sudo] pip install awscli --ignore-installed six' worked for me as well. Saved the day, basically. Thanks.
It looks like there's still some issues when following the official guidelines here https://docs.aws.amazon.com/cli/latest/userguide/cli-install-macos.html as it couldn't install aws in my case.