2017-09-27 3 views
1

kürzlich festgestellt, dass ich eine alte Version von AWS CLI ausführen, die einige Funktionalität fehlt, die ich brauche. Ich habe versucht, die letzte Version mit den nächsten Befehlen zu installieren, aber ich habe einen Fehler bekommen. Ich habe das gleiche ohne sudo -H mit dem gleichen Fehler versucht. Ich habe auch versucht, bevor sudo -H pip install --upgrade pipUpdate auf die neueste Version des AWS CLI-Tools

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' 

ich auch versucht:

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

Versuchen Sie 'sudo -H Python -m Pip installieren --upgrade Pip, manchmal löst es seltsame Probleme wie diese – kichik

Antwort

1

Try this:

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

Dies sollte ein distutils installiert Projekt rund um die „Arbeit deinstallieren (sechs) hat veraltet "Problem. Es scheint, dass das zugrunde liegende Problem kürzlich behoben wurde, da ich die --ignore-installed Option für die letzten paar Upgrades nicht verwenden musste.

Verwandte Themen