これは?
MacOS (El Capitan) でaws-cliをアップデートするときのコマンドです。
El Capitanアップデートの実行
普通にupdateするとエラーになるので、以下のコマンドでupdateします。
sudo pip install awscli --upgrade --ignore-installed six
普通に実行すると、以下のエラーに遭遇します
[~/bohelabo 19:06:42]$ sudo pip install -U awscli
Password:
The directory '/Users/bohebohechan/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.
The directory '/Users/bohebohechan/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting awscli
Downloading awscli-1.10.19-py2.py3-none-any.whl (919kB)
100% |████████████████████████████████| 921kB 634kB/s
Requirement already up-to-date: rsa<=3.3.0,>=3.1.2 in /Library/Python/2.7/site-packages (from awscli)
Requirement already up-to-date: s3transfer==0.0.1 in /Library/Python/2.7/site-packages (from awscli)
Requirement already up-to-date: colorama<=0.3.3,>=0.2.5 in /Library/Python/2.7/site-packages (from awscli)
Collecting botocore==1.4.10 (from awscli)
Downloading botocore-1.4.10-py2.py3-none-any.whl (2.3MB)
100% |████████████████████████████████| 2.3MB 249kB/s
Requirement already up-to-date: docutils>=0.10 in /Library/Python/2.7/site-packages (from awscli)
Requirement already up-to-date: pyasn1>=0.1.3 in /Library/Python/2.7/site-packages (from rsa<=3.3.0,>=3.1.2->awscli)
Requirement already up-to-date: futures<4.0.0,>=2.2.0 in /Library/Python/2.7/site-packages (from s3transfer==0.0.1->awscli)
Requirement already up-to-date: jmespath<1.0.0,>=0.7.1 in /Library/Python/2.7/site-packages (from botocore==1.4.10->awscli)
Collecting python-dateutil<3.0.0,>=2.1 (from botocore==1.4.10->awscli)
Downloading python_dateutil-2.5.2-py2.py3-none-any.whl (201kB)
100% |████████████████████████████████| 204kB 2.6MB/s
Collecting six>=1.5 (from python-dateutil<3.0.0,>=2.1->botocore==1.4.10->awscli)
Downloading six-1.10.0-py2.py3-none-any.whl
Installing collected packages: six, python-dateutil, botocore, awscli
Found existing installation: six 1.4.1
DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling six-1.4.1:
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-8.0.2-py2.7.egg/pip/basecommand.py", line 209, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-8.0.2-py2.7.egg/pip/commands/install.py", line 317, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip-8.0.2-py2.7.egg/pip/req/req_set.py", line 725, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Python/2.7/site-packages/pip-8.0.2-py2.7.egg/pip/req/req_install.py", line 752, in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Python/2.7/site-packages/pip-8.0.2-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/Library/Python/2.7/site-packages/pip-8.0.2-py2.7.egg/pip/utils/__init__.py", line 266, 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-EupUTB-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
You are using pip version 8.0.2, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.