2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

El Capitanにしてからaws cliのアップグレードに失敗した話

Posted at

El Capitanにアップデートしてから初めてawscliのアップグレードを行おうとしたら失敗した。。。

$sudo pip install --upgrade awscli
Collecting awscli from https://pypi.python.org/packages/py2.py3/a/awscli/awscli-1.10.0-py2.py3-none-any.whl#md5=007d03a9b0544b2d521ebbe6d0d66919
  Using cached awscli-1.10.0-py2.py3-none-any.whl
Collecting rsa<=3.3.0,>=3.1.2 from https://pypi.python.org/packages/3.4/r/rsa/rsa-3.3-py2.py3-none-any.whl#md5=756050e43c6a09167ec651dc0bed9bb0 (from awscli)
  Using cached rsa-3.3-py2.py3-none-any.whl
Requirement already up-to-date: colorama<=0.3.3,>=0.2.5 in /Library/Python/2.7/site-packages (from awscli)
Collecting botocore==1.3.22 (from awscli)
  Using cached botocore-1.3.22-py2.py3-none-any.whl
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: jmespath<1.0.0,>=0.7.1 in /Library/Python/2.7/site-packages (from botocore==1.3.22->awscli)
Collecting python-dateutil<3.0.0,>=2.1 (from botocore==1.3.22->awscli)
  Using cached python_dateutil-2.4.2-py2.py3-none-any.whl
Collecting six>=1.5 (from python-dateutil<3.0.0,>=2.1->botocore==1.3.22->awscli)
  Using cached six-1.10.0-py2.py3-none-any.whl
Installing collected packages: six, python-dateutil, botocore, rsa, awscli
  Found existing installation: six 1.4.1
    Uninstalling six-1.4.1:
      Exception:
      Traceback (most recent call last):
        File "/Library/Python/2.7/site-packages/pip-6.0.1-py2.7.egg/pip/basecommand.py", line 209, in main
          status = self.run(options, args)
        File "/Library/Python/2.7/site-packages/pip-6.0.1-py2.7.egg/pip/commands/install.py", line 347, in run
          root=options.root_path,
        File "/Library/Python/2.7/site-packages/pip-6.0.1-py2.7.egg/pip/req/req_set.py", line 542, in install
          requirement.uninstall(auto_confirm=True)
        File "/Library/Python/2.7/site-packages/pip-6.0.1-py2.7.egg/pip/req/req_install.py", line 660, in uninstall
          paths_to_remove.remove(auto_confirm)
        File "/Library/Python/2.7/site-packages/pip-6.0.1-py2.7.egg/pip/req/req_uninstall.py", line 126, in remove
          renames(path, new_path)
        File "/Library/Python/2.7/site-packages/pip-6.0.1-py2.7.egg/pip/utils/__init__.py", line 313, 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-xdnRJ0-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'

調べてやってみる

Githubのpipのリポジトリで以下のIssueが

Six issue when installing package #3165

sixというパッケージがEl Capitanだと既にインストールされているが、依存関係の問題でバージョンアップを行うために一旦sixをアンインストールしようとするが、Permissionがないので失敗するらしい。

本当はsixのバージョンを上げたほうがよさそうですが、とりあえず無視してインストールでもOKだった

$sudo pip install awsebcli --upgrade --ignore-installed six
$aws --version
aws-cli/1.9.15 Python/2.7.10 Darwin/15.3.0 botocore/1.3.22

virtualenvを使うとかそっちの方がよさそうなので別途実施しよう

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?