2017-09-27 19 views
1

最近、私が必要とする機能が不足している古いバージョンのAWS CLIが実行されていることがわかりました。私は次のコマンドで最後のバージョンをインストールしようとしましたが、エラーが発生しました。同じエラーでsudo -Hなしで同じことを試しました。私も、私も試してみましたsudo -H pip install --upgrade pipAWS CLIツールの最新バージョンへのアップデート

MacBook-Pro-de-lopes: lopes$ sudo -H pip install --upgrade awscli 
Password: 
Collecting awscli 
    Using cached awscli-1.11.160-py2.py3-none-any.whl 
Collecting PyYAML<=3.12,>=3.10 (from awscli) 
Collecting rsa<=3.5.0,>=3.1.2 (from awscli) 
    Using cached rsa-3.4.2-py2.py3-none-any.whl 
Collecting docutils>=0.10 (from awscli) 
    Using cached docutils-0.14-py2-none-any.whl 
Collecting botocore==1.7.18 (from awscli) 
    Using cached botocore-1.7.18-py2.py3-none-any.whl 
Collecting s3transfer<0.2.0,>=0.1.9 (from awscli) 
    Using cached s3transfer-0.1.11-py2.py3-none-any.whl 
Collecting colorama<=0.3.7,>=0.2.5 (from awscli) 
    Using cached colorama-0.3.7-py2.py3-none-any.whl 
Collecting pyasn1>=0.1.3 (from rsa<=3.5.0,>=3.1.2->awscli) 
    Using cached pyasn1-0.3.6-py2.py3-none-any.whl 
Requirement already up-to-date: jmespath<1.0.0,>=0.7.1 in /Library/Python/2.7/site-packages (from botocore==1.7.18->awscli) 
Collecting python-dateutil<3.0.0,>=2.1 (from botocore==1.7.18->awscli) 
    Using cached python_dateutil-2.6.1-py2.py3-none-any.whl 
Requirement already up-to-date: futures<4.0.0,>=2.2.0; python_version == "2.6" or python_version == "2.7" in /Library/Python/2.7/site-packages (from s3transfer<0.2.0,>=0.1.9->awscli) 
Collecting six>=1.5 (from python-dateutil<3.0.0,>=2.1->botocore==1.7.18->awscli) 
    Using cached six-1.11.0-py2.py3-none-any.whl 
Installing collected packages: PyYAML, pyasn1, rsa, docutils, six, python-dateutil, botocore, s3transfer, colorama, 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/basecommand.py", line 215, in main 
    status = self.run(options, args) 
    File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 342, in run 
    prefix=options.prefix_path, 
    File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 778, in install 
    requirement.uninstall(auto_confirm=True) 
    File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 754, in uninstall 
    paths_to_remove.remove(auto_confirm) 
    File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove 
    renames(path, new_path) 
    File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 267, 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-VB3Shu-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info' 

前に試してみました:

sudo -H python -m pip install --upgrade pip, 
Password: 
Invalid requirement: 'pip,' 
Traceback (most recent call last): 
    File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 82, in __init__ 
    req = Requirement(req) 
    File "/Library/Python/2.7/site-packages/pip/_vendor/packaging/requirements.py", line 96, in __init__ 
    requirement_string[e.loc:e.loc + 8])) 
InvalidRequirement: Invalid requirement, parse error at "','" 
+0

'sudo -H python -m pip install -upgrade pip'を試してください。時にはこのような奇妙な問題を解決します。 – kichik

答えて

1

はこのお試しください:これは、「インストールのdistutilsをアンインストールプロジェクト(6)を回避する必要があります

sudo -H pip install --upgrade awscli --ignore-installed six

をしています非難された "問題。最後の数回のアップグレードで--ignore-installedオプションを使用する必要がなかったため、根本的な問題が最近修正されたようです。

関連する問題